How to create a stand alone plpgsql proc

From: s8854617 <s8854617(at)sinamail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to create a stand alone plpgsql proc
Date: 2001-08-15 03:48:12
Message-ID: 20010815034812.2491.qmail@sinamail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Dear Sir:
  In Oracle, I can create a procedure like following:

DECLARE
A NUMBER;
BEGIN
INSERT INTO DB1 VALUES(A);
END;
/
and I run it(a.sql) use: sqlplus user/passwd @a.sql

How I create a plpgsql that like the procedure above?
(no 'create function', 'create procedure' ..., just a procedure
that I can run?)
And how to run it?

Thank your
==================================================================
新浪網.免費 50MB 電子信箱 http://www.sinamail.com

Browse pgsql-general by date

  From Date Subject
Next Message Mike Withers 2001-08-15 03:56:27 Re: Null Conversion
Previous Message newsreader 2001-08-15 03:28:47 Re: I am confused about PointerGetDatum among other things