diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index bbb83911a9a..bd5dee4286a 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -60,12 +60,6 @@ int SessionReplicationRole = SESSION_REPLICATION_ROLE_ORIGIN; -/* - * Note that this macro also exists in executor/execMain.c. There does not - * appear to be any good header to put it into, given the structures that - * it uses, so we let them be duplicated. Be sure to update both if one needs - * to be changed, however. - */ #define GetModifiedColumns(relinfo, estate) \ (rt_fetch((relinfo)->ri_RangeTableIndex, (estate)->es_range_table)->modifiedCols) diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 8ff6ede7714..cd0def4aab9 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -95,15 +95,6 @@ static void intorel_receive(TupleTableSlot *slot, DestReceiver *self); static void intorel_shutdown(DestReceiver *self); static void intorel_destroy(DestReceiver *self); -/* - * Note that this macro also exists in commands/trigger.c. There does not - * appear to be any good header to put it into, given the structures that - * it uses, so we let them be duplicated. Be sure to update both if one needs - * to be changed, however. - */ -#define GetModifiedColumns(relinfo, estate) \ - (rt_fetch((relinfo)->ri_RangeTableIndex, (estate)->es_range_table)->modifiedCols) - /* end of local decls */ diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out index dfeb5bde12b..de2f6d11b5f 100644 --- a/src/test/regress/expected/privileges.out +++ b/src/test/regress/expected/privileges.out @@ -380,14 +380,6 @@ INSERT INTO t1 (c1, c2) VALUES (1, 1); -- fail, but row not shown ERROR: duplicate key value violates unique constraint "t1_pkey" UPDATE t1 SET c2 = 1; -- fail, but row not shown ERROR: duplicate key value violates unique constraint "t1_pkey" -INSERT INTO t1 (c1, c2) VALUES (null, null); -- fail, but see columns being inserted -ERROR: null value in column "c1" violates not-null constraint -INSERT INTO t1 (c3) VALUES (null); -- fail, but see columns being inserted or have SELECT -ERROR: null value in column "c1" violates not-null constraint -INSERT INTO t1 (c1) VALUES (5); -- fail, but see columns being inserted or have SELECT -ERROR: null value in column "c2" violates not-null constraint -UPDATE t1 SET c3 = 10; -- fail, but see columns with SELECT rights, or being modified -ERROR: new row for relation "t1" violates check constraint "t1_c3_check" SET SESSION AUTHORIZATION regressuser1; DROP TABLE t1; -- test column-level privileges when involved with DELETE diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql index f3cc04bd1d3..53ab509c004 100644 --- a/src/test/regress/sql/privileges.sql +++ b/src/test/regress/sql/privileges.sql @@ -255,10 +255,6 @@ INSERT INTO t1 VALUES (3, 1, 3); SET SESSION AUTHORIZATION regressuser2; INSERT INTO t1 (c1, c2) VALUES (1, 1); -- fail, but row not shown UPDATE t1 SET c2 = 1; -- fail, but row not shown -INSERT INTO t1 (c1, c2) VALUES (null, null); -- fail, but see columns being inserted -INSERT INTO t1 (c3) VALUES (null); -- fail, but see columns being inserted or have SELECT -INSERT INTO t1 (c1) VALUES (5); -- fail, but see columns being inserted or have SELECT -UPDATE t1 SET c3 = 10; -- fail, but see columns with SELECT rights, or being modified SET SESSION AUTHORIZATION regressuser1; DROP TABLE t1;