Skip to content

Commit c8e9935

Browse files
committed
Fix failure to propagate collation in negate_clause().
Turns out it was this, and not so much plpgsql, that was at fault in Stefan Huehner's collation-error-in-a-trigger bug report of a couple weeks ago.
1 parent 9b19c12 commit c8e9935

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/optimizer/prep/prepqual.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ negate_clause(Node *node)
104104
newopexpr->opfuncid = InvalidOid;
105105
newopexpr->opresulttype = opexpr->opresulttype;
106106
newopexpr->opretset = opexpr->opretset;
107+
newopexpr->opcollid = opexpr->opcollid;
108+
newopexpr->inputcollid = opexpr->inputcollid;
107109
newopexpr->args = opexpr->args;
108110
newopexpr->location = opexpr->location;
109111
return (Node *) newopexpr;
@@ -126,6 +128,7 @@ negate_clause(Node *node)
126128
newopexpr->opno = negator;
127129
newopexpr->opfuncid = InvalidOid;
128130
newopexpr->useOr = !saopexpr->useOr;
131+
newopexpr->inputcollid = saopexpr->inputcollid;
129132
newopexpr->args = saopexpr->args;
130133
newopexpr->location = saopexpr->location;
131134
return (Node *) newopexpr;

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