diff options
author | Kevin Grittner <kgrittn@postgresql.org> | 2017-04-06 17:32:53 -0500 |
---|---|---|
committer | Kevin Grittner <kgrittn@postgresql.org> | 2017-04-06 17:32:53 -0500 |
commit | 255efa241f460ee4f4c4c98c8cdd7457807f3af9 (patch) | |
tree | ac9c15c5540f3e9528a55a4cfa706018304b62fc | |
parent | fa117ee40330db401da776e7b003f047098a7d4c (diff) | |
download | postgresql-255efa241f460ee4f4c4c98c8cdd7457807f3af9.tar.gz postgresql-255efa241f460ee4f4c4c98c8cdd7457807f3af9.zip |
Fix the RTE_NAMEDTUPLESTORE case in get_rte_attribute_is_dropped().
Problems pointed out by Andres Freund and Thomas Munro.
-rw-r--r-- | src/backend/parser/parse_relation.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 7db13f37f72..062b8a1d22e 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -2891,12 +2891,12 @@ get_rte_attribute_is_dropped(RangeTblEntry *rte, AttrNumber attnum) Assert(rte->enrname); /* - * We checked when we loaded ctecoltypes for the tuplestore - * that InvalidOid was only used for dropped columns, so it is - * safe to count on that here. + * We checked when we loaded coltypes for the tuplestore that + * InvalidOid was only used for dropped columns, so it is safe + * to count on that here. */ result = - (list_nth(rte->coltypes, attnum - 1) != InvalidOid); + ((list_nth_oid(rte->coltypes, attnum - 1) == InvalidOid)); } break; case RTE_JOIN: |