Skip site navigation (1) Skip section navigation (2)

Re: procedures for adding data

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 (view raw or flat)
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




In response to

pgsql-novice by date

Next:From: Danjel JungersenDate: 2005-12-20 07:33:31
Subject: Re: Login problem
Previous:From: Mogin MohandasDate: 2005-12-19 23:08:44
Subject: Re: procedures for adding data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group