diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2023-01-11 22:56:34 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2023-01-11 23:01:22 -0500 |
commit | f0e6d6d3c909e14eedd370dd77d7111c2ae24c02 (patch) | |
tree | 70ef8e8249e7d43e5f46f66a1d6a8446b5b10f33 /src/backend/commands/lockcmds.c | |
parent | 5a26c7b310b629f8893483cc3cce5bbfa7879115 (diff) | |
download | postgresql-f0e6d6d3c909e14eedd370dd77d7111c2ae24c02.tar.gz postgresql-f0e6d6d3c909e14eedd370dd77d7111c2ae24c02.zip |
Revert "Get rid of the "new" and "old" entries in a view's rangetable."
This reverts commit 1b4d280ea1eb7ddb2e16654d5fa16960bb959566.
It's broken the buildfarm members that run cross-version-upgrade tests,
because they're not prepared to deal with cosmetic differences between
CREATE VIEW commands emitted by older servers and HEAD. Even if we had
a solution to that, which we don't, it'd take some time to roll it out
to the affected animals. This improvement isn't valuable enough to
justify addressing that problem on an emergency basis, so revert it
for now.
Diffstat (limited to 'src/backend/commands/lockcmds.c')
-rw-r--r-- | src/backend/commands/lockcmds.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c index 9755d6ed13f..99e68bff85d 100644 --- a/src/backend/commands/lockcmds.c +++ b/src/backend/commands/lockcmds.c @@ -194,6 +194,15 @@ LockViewRecurse_walker(Node *node, LockViewRecurse_context *context) char relkind = rte->relkind; char *relname = get_rel_name(relid); + /* + * The OLD and NEW placeholder entries in the view's rtable are + * skipped. + */ + if (relid == context->viewoid && + (strcmp(rte->eref->aliasname, "old") == 0 || + strcmp(rte->eref->aliasname, "new") == 0)) + continue; + /* Currently, we only allow plain tables or views to be locked. */ if (relkind != RELKIND_RELATION && relkind != RELKIND_PARTITIONED_TABLE && relkind != RELKIND_VIEW) |