How to create a stand alone plpgsql proc - Mailing list pgsql-general

From s8854617
Subject How to create a stand alone plpgsql proc
Date
Msg-id 20010815051939.27447.qmail@sinamail.com
Whole thread Raw
List pgsql-general
Dear Sir:
  In Oracle, I can create a stand-alone procedure like that:
    DECLARE
      A NUMBER;
      B NUMBER;
    BEGIN
      A := 1;
      B := 2;
      INSERT INTO TABLE1 VALUES (A, B);
    END;
    /
  Then I run it(a.sql) with the command in shell:
    sqlplus username/passwd @a.sql
  In postgresql, how do I write similar plpgsql procedure without
  using "CREATE FUNCTION" or "CREATE PROCEDURE" ..., and how to
  execute it?
                         Thank you
==================================================================
新浪網.免費 50MB 電子信箱  http://www.sinamail.com



pgsql-general by date:

Previous
From: "Ivan Babikov"
Date:
Subject: Is it possible to work with big databases (up to 10Gb) under Postgres?
Next
From: Jochem van Dieten
Date:
Subject: Re: Calling stored procedures.