From: | Christopher Browne <cbbrowne(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: "stored procedures" - use cases? |
Date: | 2011-05-10 02:16:28 |
Message-ID: | BANLkTi=4bNsv=ZB52OqOjYv_qssWtivj0A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, May 9, 2011 at 9:21 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 05/09/2011 08:20 PM, Bruce Momjian wrote:
>>
>> Tom Lane wrote:
>>>
>>> Peter Eisentraut<peter_e(at)gmx(dot)net> writes:
>>>>
>>>> On mån, 2011-04-25 at 14:35 -0500, Kevin Grittner wrote:
>>>>>
>>>>> (1) All the \d commands in psql should be implemented in SPs so
>>>>> that they are available from any client, through calling one SP
>>>>> equivalent to one \d command.
>>>>
>>>> You don't need stored procedures with special transaction behavior for
>>>> this.
>>>
>>> No, but what you *would* need is the ability to return multiple result
>>> sets from one call. Even then, you could not exactly duplicate the
>>> current output of \d; but you could duplicate the functionality.
>>
>> Oh, good point. Thanks.
>
> Multiple resultsets in one call would be a good thing, though, no?
>
> cheers
I *thought* the purpose of having stored procedures was to allow a
substrate supporting running multiple transactions, so it could do
things like:
- Managing vacuums
- Managing transactions
- Replacing some of the need for dblink.
- Being an in-DB piece that could manage LISTENs
It seems to be getting "bikeshedded" into something with more
"functional argument functionality" than stored functions.
I think we could have a perfectly successful implementation of "stored
procedures" that supports ZERO ability to pass arguments in or out.
That's quite likely to represent a good start.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-05-10 02:25:07 | the big picture for index-only scans |
Previous Message | Andrew Dunstan | 2011-05-10 02:15:39 | Re: Formatting Curmudgeons WAS: MMAP Buffers |