Re: Temp Table

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Temp Table
Date: 2007-10-19 18:41:56
Message-ID: 4718FA74.3090905@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/19/07 11:39, Bob Pawley wrote:
> When I fetch a row, as in the following, how do I copy the row's data into a temporary table so that I can process it??
>
> begin work;
> Declare loop_set Cursor
> for Select one, two, three, four, five, six, seven from loop_import
> order by loop_id ;
> fetch next From loop_set;

Wouldn't it be simpler to do:
INSERT INTO some_temp SELECT field list FROM some_table;

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHGPp0S9HxQb37XmcRAlpUAKDTR/qG8VQxZJpt1IyqZp7l9Q+V0gCfSW54
ANpxcxz4AAOYddctMe4inJc=
=1lk2
-----END PGP SIGNATURE-----

In response to

  • Temp Table at 2007-10-19 16:39:20 from Bob Pawley

Browse pgsql-general by date

  From Date Subject
Next Message brian 2007-10-19 18:43:13 Re: Order-independent multi-field uniqueness constraint?
Previous Message Steve Crawford 2007-10-19 18:20:02 Re: Abbreviation list