Stored Procedures - Mailing list pgsql-general

From Johann Höchtl
Subject Stored Procedures
Date
Msg-id 38037DB3.1FD1205E@bigfoot.com
Whole thread Raw
List pgsql-general
Dear Herouth,

I am really new to PostgreSQL but :

PostgreSQL has two very mighty PL's called PLTCL and PLSQL. They are not
executed within the server itself but executed as shared libraries.
Security gain while losing a lot of speed, indeed.

Beside that, PL's are a very usefull thing: Think of an inventory system
which has to give a new inventory number according a complex algorithm;
retrieving first all existing inventory numbers to the client would be
stupid. The server is the right place for such calculations.

lG,
    Hans.


----------------------
Original message was :


Date: Tue, 12 Oct 1999 18:10:41 +0200
From: Herouth Maoz <herouth@oumail.openu.ac.il>
Subject: Re: [GENERAL] stored procedure revisited

At 09:33 +0200 on 10/10/1999, Yin-So Chen wrote:


> 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.

AFAIK, there are no stored procedures in PostgreSQL. Maybe they are in a

low priority, or the developers are just trying to avoid the problems of

doing them. I'm not a developer, but I get the impression that sets of
rows
are not well-abstracted in PostgreSQL. I think this is also the reason
why
there are no subselects in target lists yet (correct me if I'm wrong).

Anyway, sometimes the proper solution for things you stated (i.e. return
a
set of rows without using the entire query every time) are more
correctly
done with views. Other things (procedural things that don't result in
sets
of rows) are handled by functions. So you have a rather small niche for
which only stored procedures are the most proper tool, and which is not
covered in PostgreSQL.

If you think this niche is important, maybe you should convince the rest
of
us here (I never needed to use a stored procedure so far, and I don't
remember many people using them five years ago when I was in an Oracle
environment). Or you could prioritize it with money...

Herouth

- --
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




pgsql-general by date:

Previous
From: Kevin Heflin
Date:
Subject: questing using array
Next
From: "amy cheng"
Date:
Subject: two serial fields within one table?