!3518 修复视图定义中包含row mark子句时报错的问题
Merge pull request !3518 from chenxiaobin/fixViewUpdate
This commit is contained in:
@ -1808,13 +1808,13 @@ static RowMarkClause* _readRowMarkClause(void)
|
||||
|
||||
READ_UINT_FIELD(rti);
|
||||
READ_BOOL_FIELD(forUpdate);
|
||||
IF_EXIST(waitSec) {
|
||||
READ_INT_FIELD(waitSec);
|
||||
}
|
||||
|
||||
IF_EXIST(waitPolicy) {
|
||||
READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
|
||||
}
|
||||
IF_EXIST(waitSec) {
|
||||
READ_INT_FIELD(waitSec);
|
||||
}
|
||||
/* convert noWait (true/false) to LockWaitPolicy (LockWaitError/LockWaitBlock) */
|
||||
IF_EXIST(noWait) {
|
||||
READ_ENUM_EXPR(waitPolicy, LockWaitPolicy, (strtobool(token) ? LockWaitError : LockWaitBlock));
|
||||
|
@ -201,3 +201,14 @@ select pg_get_viewdef('tt20v', true);
|
||||
(1 row)
|
||||
|
||||
drop view tt20v;
|
||||
create table test_view_for_update_tbl (a int, b int);
|
||||
create view test_view_for_update_view1 as select * from test_view_for_update_tbl for key share;
|
||||
create view test_view_for_update_view2 as select * from test_view_for_update_tbl for share;
|
||||
create view test_view_for_update_view3 as select * from test_view_for_update_tbl for no key update;
|
||||
create view test_view_for_update_view4 as select * from test_view_for_update_tbl for update;
|
||||
drop table test_view_for_update_tbl cascade;
|
||||
NOTICE: drop cascades to 4 other objects
|
||||
DETAIL: drop cascades to view test_view_for_update_view1
|
||||
drop cascades to view test_view_for_update_view2
|
||||
drop cascades to view test_view_for_update_view3
|
||||
drop cascades to view test_view_for_update_view4
|
||||
|
@ -73,3 +73,10 @@ select * from
|
||||
cast(1+2 as int8) as i8;
|
||||
select pg_get_viewdef('tt20v', true);
|
||||
drop view tt20v;
|
||||
|
||||
create table test_view_for_update_tbl (a int, b int);
|
||||
create view test_view_for_update_view1 as select * from test_view_for_update_tbl for key share;
|
||||
create view test_view_for_update_view2 as select * from test_view_for_update_tbl for share;
|
||||
create view test_view_for_update_view3 as select * from test_view_for_update_tbl for no key update;
|
||||
create view test_view_for_update_view4 as select * from test_view_for_update_tbl for update;
|
||||
drop table test_view_for_update_tbl cascade;
|
||||
|
Reference in New Issue
Block a user