Re: "stored procedures" - use cases?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "stored procedures" - use cases?
Date: 2011-04-26 23:01:00
Message-ID: 4DB7085C020000250003CED1@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-04-26 23:08:54 Re: "stored procedures" - use cases?
Previous Message Josh Berkus 2011-04-26 22:55:38 Re: "stored procedures" - use cases?