From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Mogin Mohandas <moginmo(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: procedures for adding data |
Date: | 2005-12-19 23:35:27 |
Message-ID: | DC9CB271-0DCE-45C4-9DC8-08EEADAF3B99@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Danjel Jungersen | 2005-12-20 07:33:31 | Re: Login problem |
Previous Message | Mogin Mohandas | 2005-12-19 23:08:44 | Re: procedures for adding data |