PL/pgsql questions..

From: tveith(at)heaven(dot)oeh(dot)univie(dot)ac(dot)at
To: pgsql-sql(at)postgresql(dot)org
Subject: PL/pgsql questions..
Date: 1999-04-25 17:10:34
Message-ID: Pine.LNX.3.96.990425191005.20955B-100000@heaven.oeh.univie.ac.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I'm new on this list and i'm using postgreSQL 6.5. I think it has done a
great step towards usability since the days when i last took a look at it
(postgres 95).. congrats, you did a very good job.

One thing which I think is really important is PL/pgsql.. I carefully read
the bit of information which is available, but thats not very much..

I have 2 questions.. first, can you point me to some information about
this topic which i maybe have missed?

second, take this procedure from an informix database:

create procedure list_abteilung (p_mandnr smallint)
returning smallint, char(30);

define v_abtnr smallint;
define v_abtbez char(30);

foreach
select a.abtnr, a.abtbez
into v_abtnr, v_abtbez
from gm_abt a, gm_maabt m
where a.abtnr=m.abtnr
and m.gesperrt<>1
and a.gesperrt<>1
and m.mandant=p_mandnr
return v_abtnr, v_abtbez with resume;
end foreach;

end procedure;

i will try to explain the two main features of this procedure: foreach is
a loop which iterates through the resultset of the query; return with
resume returns a row to the caller and then continues with the procedure.

of course i know that this particular procedure could be easily
substituted by a view; i just took it because it is short and
demonstrates this two important features.

so my question is, does PG/plsql support this, if so how, and if not, is
it planned to be supported in the near future?

best regards,
Thomas Veith

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tim Perdue 1999-04-25 17:59:53 Primary Key Bugs
Previous Message Tom Lane 1999-04-25 16:47:49 Re: [SQL] Relating 1 table to another.