On Sep 8, 2009, at 9:12 AM, Alvaro Herrera wrote:
foo(anyelement, anyelement) returns anyelement
but this will force them to be both of the same type, which is not
what
we want. In my opinion this is a missing feature of our type system.
Oh yes, agreed. I've run into this with pgTAP many times.
One seemingly trivial idea would be to have anyelement2, anyelement3,
and so on. This is not a very good solution, because we'd have to
fill
the catalogs with a large bunch of new pseudotypes, and the code
with a
bunch of hardcoded tests -- and there are already 27 cases of
ANYELEMENTOID in our code.
Yes, and foo() might be called with two different data types, or two
of the same, and both should work.
<snip what="other useful information" />
Before I spend time trying to figure out how this works,
1. is there agreement that this is a problem and needs fixed, and
+1
2. does anybody have an idea how to attack it?
Why can't anyelement be freed from this constraint?
Best,
David
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers