Skip to content

Commit 255efa2

Browse files
committed
Fix the RTE_NAMEDTUPLESTORE case in get_rte_attribute_is_dropped().
Problems pointed out by Andres Freund and Thomas Munro.
1 parent fa117ee commit 255efa2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/parser/parse_relation.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,12 +2891,12 @@ get_rte_attribute_is_dropped(RangeTblEntry *rte, AttrNumber attnum)
28912891
Assert(rte->enrname);
28922892

28932893
/*
2894-
* We checked when we loaded ctecoltypes for the tuplestore
2895-
* that InvalidOid was only used for dropped columns, so it is
2896-
* safe to count on that here.
2894+
* We checked when we loaded coltypes for the tuplestore that
2895+
* InvalidOid was only used for dropped columns, so it is safe
2896+
* to count on that here.
28972897
*/
28982898
result =
2899-
(list_nth(rte->coltypes, attnum - 1) != InvalidOid);
2899+
((list_nth_oid(rte->coltypes, attnum - 1) == InvalidOid));
29002900
}
29012901
break;
29022902
case RTE_JOIN:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy