Re: procedures for adding data - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: procedures for adding data
Date
Msg-id DC9CB271-0DCE-45C4-9DC8-08EEADAF3B99@myrealbox.com
Whole thread Raw
In response to Re: procedures for adding data  (Mogin Mohandas <moginmo@gmail.com>)
List pgsql-novice
On Dec 20, 2005, at 8:08 , Mogin Mohandas wrote:

>               In Oracle, a procedure can be used:
>     Create or Replace Procedure "tablename"
>          //variable declarations
>      BEGIN
>              //do some kind of incrementing or whatever for the
> variables used for each column
>              insert into "tablename" values(
>                           //give the values of each column as required
>                  )
>       commit;
>      END

Take a look at PL/pgsql. I believe it should be able to do what you
require.

http://www.postgresql.org/docs/current/interactive/plpgsql.html

The PostgreSQL documentation is quite good, and is most likely
included with your PostgreSQL installation. It's also included in the
source code, which is available for download. These are good options
if you're interested in offline viewing. The current documentation is
also available online at

http://www.postgresql.org/docs/current/interactive/index.html

Hope this helps.

Michael Glaesemann
grzm myrealbox com




pgsql-novice by date:

Previous
From: Mogin Mohandas
Date:
Subject: Re: procedures for adding data
Next
From: "Danjel Jungersen"
Date:
Subject: Re: Login problem