Re: procedures for adding data

From: Mogin Mohandas <moginmo(at)gmail(dot)com>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: procedures for adding data
Date: 2005-12-19 23:08:44
Message-ID: fd2290fd0512191508g56001167q6ff1d7fdd951d472@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Micheal,
Thanx for the info. Im sorry, it was a typing mistake......I
meant a large no of rows......
Basically, I do not want to give each row. I just want to write some
procedure which will generate the column values of each row in a specified
manner.....this is so that I can test a GIST index i tried to build on a UDT
called Complex. The values in the rows dont matter.
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

I just wanted to know whether there is something like this in Postgresql
Thanks a lot
Mogin

On 12/18/05, Michael Glaesemann <grzm(at)myrealbox(dot)com> wrote:
>
>
> On Dec 19, 2005, at 12:41 , Mogin Mohandas wrote:
>
> > I wanted to know how to add a large no of columns in
> > postgresql by running a procedure....
>
> Adding a large number of columns or a large number of rows? I'm
> unaware of any method to add a large number of columns other than
> using ALTER TABLE.
>
> http://www.postgresql.org/docs/current/interactive/sql-altertable.html
>
> If you're interested in adding a large number of rows, you may be
> interested in COPY.
>
> http://www.postgresql.org/docs/current/interactive/sql-copy.html
>
> Also, if you describe your situation in more detail (i.e., what you
> are trying to accomplish by adding a large number of columns), you
> may receive suggestions on how to do this.
>
> > but i cant seem to find a syntax for one like
> > the one in Oracle...if anybody has any idea...please tell me...
>
> I am not familiar with Oracle, but others on this list may be. If you
> provide the Oracle syntax for what you would like to do, perhaps
> another may be able to help you.
>
> Michael Glaesemann
> grzm myrealbox com
>
>
>
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Glaesemann 2005-12-19 23:35:27 Re: procedures for adding data
Previous Message Kent Morrison 2005-12-19 22:11:29 Install Error