Hi,
> It's intentional; IIRC, the current behavior is defined that way because
> that's what the JDBC driver needs to implement the JDBC specs. Putting
> information about composite types where information about tables is
> expected would confuse the heck out of existing client code.
Thanks for the info. So, given that RowDescription is a dead-end, is there
any other way I can determine the composite type associated with a function
return? If, for example, I have the following defined in the database,
CREATE TABLE foobar (quant int);
CREATE TYPE foobar_t AS (quant int);
CREATE FUNCTION foobar2 () RETURNS SETOF foobar_t AS
'SELECT * FROM foobar' LANGUAGE sql STABLE;
and the client side issues a "SELECT * FROM foobar2 ()", is there some
means of determining that a function "foobar2" returning "foobar_t" was
invoked? I don't care how convoluted the steps may be, since all of this
happens at compile-time and has a zero runtime penalty.
Barring client-side parsing of SQL (a dumb idea), the only solution I can
think of requires the client code to explicitly mark the function invoked.
I would rather avoid this solution, however, since it is error prone and
defeats the premise of the library.
Thanks again for your time and attention!
Cheers,
Dario