Re: Oracle PL/SQL Anonymous block equivalent in postgres - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Oracle PL/SQL Anonymous block equivalent in postgres
Date
Msg-id 20051227171859.GF72143@pervasive.com
Whole thread Raw
In response to Re: Oracle PL/SQL Anonymous block equivalent in postgres  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Oracle PL/SQL Anonymous block equivalent in postgres
List pgsql-hackers
On Thu, Dec 22, 2005 at 06:35:24PM -0500, Bruce Momjian wrote:
> Hannu Krosing wrote:
> > ?hel kenal p?eval, N, 2005-12-22 kell 18:19, kirjutas Bruce Momjian:
> > I guess he rather wants to have dont-save-but-execute-immediately
> > pl/pgsql code.
> > 
> > could this perhaps be solved by having temporary functions, similar to
> > postgresql's temporary tables ?
> 
> I am thinking they want the ability to sit at a prompt and type stuff.

FWIW, I would find the ability to run stuff from the prompt useful for
debugging plpgsql functions. Rather than

edit function def
CREATE OR REPLACE FUNCTION ...
test function

you could just edit in-place and test.

Of course having the ability to execute arbitrary plpgsql in .sql
scripts would be handy in some cases as well, though as others pointed
out there are alternatives.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and
Next
From: Bruce Momjian
Date:
Subject: Re: [DOCS] Online backup vs Continuous backup