Joe Conway <mail@joeconway.com> writes:
> Kris Jurka wrote:
>> I was trying formulate a way to make a function which will explode an
>> array into a resultset composed of the index and value.
> I submitted a function that would do this, array_values(), but it was
> rejected. See:
> http://archives.postgresql.org/pgsql-hackers/2002-12/msg00453.php
> Perhaps we should revisit that decision before feature freeze for 7.4?
Kris' example didn't seem at all compelling to me, since the basic query
design was wrong anyway if he hopes to deal with multiple-column foreign
keys. You can't have just one instance of pg_attribute being joined to,
unless you are planning to execute the query again for each column ---
and in that case the tests might as well be like "attnum = conkey[1]",
next time "attnum = conkey[2]", etc.
regards, tom lane