Re: Temp Table - Mailing list pgsql-general

From Ron Johnson
Subject Re: Temp Table
Date
Msg-id 4718FA74.3090905@cox.net
Whole thread Raw
In response to Temp Table  (Bob Pawley <rjpawley@shaw.ca>)
List 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-----

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Abbreviation list
Next
From: brian
Date:
Subject: Re: Order-independent multi-field uniqueness constraint?