From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "David Fetter" <david(at)fetter(dot)org> |
Cc: | "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Andres Freund" <andres(at)anarazel(dot)de>, "jd(at)commandprompt(dot)com" <jd(at)commandprompt(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Rob Wultsch" <wultsch(at)gmail(dot)com>, "Dimitri Fontaine" <dfontaine(at)hi-media(dot)com>, "Stefan Kaltenbrunner" <stefan(at)kaltenbrunner(dot)cc>, "Guillaume Lelarge" <guillaume(at)lelarge(dot)info>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Bernd Helmle" <mailings(at)oopsware(dot)de>, <pgsql-hackers(at)postgresql(dot)org>, "Stephen Frost" <sfrost(at)snowman(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: SHOW TABLES |
Date: | 2010-07-19 22:16:39 |
Message-ID: | 4C4488770200002500033912@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Fetter <david(at)fetter(dot)org> wrote:
> Would something like this do? Thanks to Andrew Gierth for helping
> me figure out how to get this working :)
>
> CREATE OR REPLACE FUNCTION multi_result()
> RETURNS SETOF REFCURSOR
With appropriate tweaks to JDBC and the other drivers, this would
cover a lot of ground. You might be able to cover the last little
bit by returning a SETOF some record with (at least) three columns,
one of which would be filled in each row: REFCURSOR (for a result
set), INTEGER (for a row count), and something which could carry an
object which would map to a SQLWarning (which can be used with
SQLSTATE '00000' to deliver informational text or '01xxx' for actual
warnings). A JDBC execute request (as opposed to executeUpdate or
executeQuery) may get back any combination of the above in an
ordered fashion. Essentially, this meta result set would need to be
hidden within the Statement object.
http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/sql/Statement.html#execute%28java.lang.String%29
http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/sql/Statement.html#getWarnings%28%29
-Kevin
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2010-07-19 23:08:47 | Re: Parsing of aggregate ORDER BY clauses |
Previous Message | Peter Eisentraut | 2010-07-19 21:04:04 | Re: standard_conforming_strings |