postgresql/src/backend
Andrew Gierth d9a4cce29d Fix error case for CREATE ROLE ... IN ROLE.
CreateRole() was passing a Value node, not a RoleSpec node, for the
newly-created role name when adding the role as a member of existing
roles for the IN ROLE syntax.

This mistake went unnoticed because the node in question is used only
for error messages and is not accessed on non-error paths.

In older pg versions (such as 9.5 where this was found), this results
in an "unexpected node type" error in place of the real error. That
node type check was removed at some point, after which the code would
accidentally fail to fail on 64-bit platforms (on which accessing the
Value node as if it were a RoleSpec would be mostly harmless) or give
an "unexpected role type" error on 32-bit platforms.

Fix the code to pass the correct node type, and add an lfirst_node
assertion just in case.

Per report on irc from user m1chelangelo.

Backpatch all the way, because this error has been around for a long
time.
2020-04-25 05:09:30 +01:00
..
access Fix handling of WAL segments ready to be archived during crash recovery 2020-04-24 08:48:28 +09:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Repair performance regression in information_schema.triggers view. 2020-04-24 12:02:36 -04:00
commands Fix error case for CREATE ROLE ... IN ROLE. 2020-04-25 05:09:30 +01:00
executor Fix transient memory leak for SRFs in FROM. 2020-04-22 19:53:06 -07:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
lib Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
libpq Improve error messages after LoadLibrary() 2020-04-13 10:24:46 +02:00
main Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nodes Add ALTER .. NO DEPENDS ON 2020-04-20 13:42:12 -04:00
optimizer Fix cost_incremental_sort for expressions with varno 0 2020-04-23 00:15:24 +02:00
parser Add ALTER .. NO DEPENDS ON 2020-04-20 13:42:12 -04:00
partitioning Suppress unused-variable warning. 2020-04-10 12:00:28 -04:00
po Translation updates 2019-06-17 15:30:20 +02:00
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Fix collection of typos and grammar mistakes in the tree 2020-04-10 11:18:39 +09:00
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Rename exposed identifiers to say "backup manifest". 2020-04-23 08:44:06 -04:00
rewrite Fix INSERT OVERRIDING USER VALUE behavior 2020-03-31 08:50:39 +02:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Modify additional power 2 calculations to use new helper functions 2020-04-08 18:29:51 +12:00
storage Revert 0f5ca02f53 2020-04-08 11:37:27 +03:00
tcop Revert 0f5ca02f53 2020-04-08 11:37:27 +03:00
tsearch Further cleanup of ts_headline code. 2020-04-09 15:38:43 -04:00
utils Remove ACLDEBUG #define and associated code. 2020-04-23 15:38:04 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00