Search Postgresql Archives

Re: Information about columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



 

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux