On Sep 21, 2011, at 6:12 PM, Tom Lane wrote:
>> Any idea of how to test for that? What kind of situations would make
>> things difficult for the parser?
>
> Not sure, but it would be underspecified cases such as 'x' = 'x' that
> might have trouble. I may be worrying over nothing --- I'm just trying
> to point out some trouble spots you'd better watch for while messing
> with this.
Right, we'd need to make sure that 'x' = 'x' resolves to 'x'::text = 'x'::text.
Josh, I think the issue Tom is raising is something I've seen when there are
multiple functions that could be correct for a given call. For example:
select citext_eq('x', 'x'::citext);
If you have these functions:
1. citext_eq(citext,citext)
2. citext_eq(text,citext)
3. citext_eq(citext,text)
Then the question is: does it find only #2 via polymorphic lookup, or does it
think that either #1 or #2 could work (because text supports an implicit cast
to citext, IIRC). If it's more than one it's an error. Not sure if the same
issue exists for operators.
This is easy to test for, however, so we'll soon know if there's an issue.
Best,
David
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers