Обсуждение: Re: [GENERAL] stored procedure revisited

Поиск
Список
Период
Сортировка

Re: [GENERAL] stored procedure revisited

От
"amy cheng"
Дата:
forgive my ignorance. why "multi-resultset, multi-level transaction" SP is
so important? no work-around? I rememeber there were some discussion on
multiple-return-value-function in the past. My impression is that they are
not that crucial and usually can
find rather simple work-arounds.



>From: Yin-So Chen <ychen1@uswest.net>
>To: "pgsql-general@postgreSQL.org" <pgsql-general@postgreSQL.org>
>Subject: [GENERAL] stored procedure revisited
>Date: Sun, 10 Oct 1999 00:33:33 -0700
>
>Hi,
>
>I've gone through the mailing list archives and the documentation to
>search on this topic, and amazingly there is almost no signs of stored
>procedure discussions anywhere.  Once a while a person would ask the
>question of how to do SP in postgresql, and it will be greeted with
>silence.  Not that anyone is obligated to reply, but the low volume
>about this topic seems to mean:
>
>1. this is a very dumb question, rtfm first.
>
>2. no one knows.
>
>When reading through the documentation, it seems there isn't a way to do
>SP like in other databases.  The closest thing is the CREATE FUNCTION
>command, which can only return one value or a set of one row (of course,
>when it's an opaque function it acts just like other SP).  This is very
>far from the multi-resultset, multi-level transaction SP in other
>databases.  When I go through the ToDo list, SP is not on it either.
>
>I think I am missing something very obvious here.  Can someone please
>kind enough explain to me, is there SP for postgresql and where I can
>find more information about it?  If there isn't, is there any plan for
>implementation?  Seems there needs to be an extra table that would hold
>the parsed query tree and a rewrite of the parser to make SP work.
>
>Regards,
>
>yin-so chen
>
>************
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Re: [GENERAL] stored procedure revisited

От
Yin-So Chen
Дата:
amy cheng wrote:
>
> forgive my ignorance. why "multi-resultset, multi-level transaction" SP is
> so important? no work-around? I rememeber there were some discussion on
> multiple-return-value-function in the past. My impression is that they are
> not that crucial and usually can
> find rather simple work-arounds.
>

SP is important for a lot of reasons.  First it allows faster network
transmission because you don't have to send the query over and over
again, second it allows for faster execution because the server doesn't
need to reparse the query every time, third it allows for conceptual
abstraction so the queries can be moved into the database layer, etc...
"multi-resultset, multi-level transaction" is just an indication of what
other database can do with SP's.  All I want to know is if there is SP
for postgresql, or _better_than_SP_ alternatives.

Work-arounds are, exactly that, work-arounds.  They are something that
will work _for_now_, but not the best solution.  I ask the question not
because I don't know how to live without SP, but because I want to see
what the mentality is behind the whole thing - is there something
intrinsically wrong with having SP, or is there some better stuffs than
SP out there, etc.  What makes a piece of software great?  When its
developers do not settle for work-arounds.

My questions still stand.  Please can someone fill in on the status with
SP, thanks.

Regards,

yin-so chen