From: | darioteixeira(at)yahoo(dot)com |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | John DeSoi <desoi(at)pgedit(dot)com>, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Information about columns |
Date: | 2009-06-23 13:07:22 |
Message-ID: | 91950.19366.qm@web111515.mail.gq1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2009-06-23 13:11:17 | Re: [BUGS] Integrity check |
Previous Message | Dave Page | 2009-06-23 13:00:51 | Re: [BUGS] Integrity check |