Re: "stored procedures" - use cases? - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: "stored procedures" - use cases?
Date
Msg-id 4DB7085C020000250003CED1@gw.wicourts.gov
Whole thread Raw
In response to Re: "stored procedures" - use cases?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> No, but what you *would* need is the ability to return multiple
> result sets from one call.
At least.
> Even then, you could not exactly duplicate the current output of
> \d; but you could duplicate the functionality.
I would think that psql could duplicate the output pretty closely, 
especially if the output of the stored procedure was a stream of
intermingled result sets and messages (as from ereport).  This is
what many products provide.  They usually show messages with a class
'00' SQLSTATE just as plain text lines, and decorate the more severe
levels with appropriate additional information.
A while back I included a link to show what Sybase returns from
their sp_help SP for various object types:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36273.1550/html/sprocs/X85190.htm
Note the lines like:Object does not have any indexes.
This came from the server as a SQLSTATE '00000' message.
-Kevin


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: "stored procedures" - use cases?
Next
From: "Kevin Grittner"
Date:
Subject: Re: "stored procedures" - use cases?