From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Shigeru HANADA <shigeru(dot)hanada(at)gmail(dot)com> |
Cc: | "pgsql-hackers >> PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why does exprCollation reject List node? |
Date: | 2012-03-16 13:17:11 |
Message-ID: | 6736.1331903831@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Shigeru HANADA <shigeru(dot)hanada(at)gmail(dot)com> writes:
> During writing pgsql_fdw codes, I noticed that exprCollation rejects
> non-Expr nodes with error "unrecognized node type: %d". Is this
> intentional behavior, or can it return InvalidOid for unrecognized nodes
> like exprInputCollation?
Doesn't seem to me that asking for the collation of a list is very
sensible, so I don't see a problem with that.
> Background information: I use exprCollation with expression_walker in
> pgsql_fdw to know whether an expression in baserestrictinfo->clause list
> uses any collation, to determine the clause can be pushed down safely.
Returning InvalidOid in such a case would be the *wrong answer*, because
it would presumably lead the code to conclude that nothing within the
list has a collation, which ain't necessarily so.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2012-03-16 13:31:29 | Re: Syntax error and reserved keywords |
Previous Message | Dimitri Fontaine | 2012-03-16 12:50:20 | Re: Syntax error and reserved keywords |