Re: Help with select into - Mailing list pgsql-general

From Tom Lane
Subject Re: Help with select into
Date
Msg-id 16468.1046837252@sss.pgh.pa.us
Whole thread Raw
In response to Help with select into  (Brent Wood <b.wood@niwa.co.nz>)
List pgsql-general
Brent Wood <b.wood@niwa.co.nz> writes:
> What I want to do now is save the data as a table, using select into.
> The modified query (as I read the docs) should be:
> SELECT chat_cells.cell_id,
>        chat_cells.cell,
>        (@@ chat_cells.cell) AS centre,
>        int4(id_depth.depth) AS depth,
>        chat_cells.substrate
> INTO table1
> FROM chat_cells,
>      id_depth
> WHERE (chat_cells.cell_id = id_depth.depth_id);

Looks fine to me.

> When I run this, I get the error message:
> PostgreSQL Error Message:
> ERROR: DECLARE CURSOR must not specify INTO

You had better let us into the secret of what client-side code you're
using.  There's no cursor in the stated query, so something is
editorializing on your query...

            regards, tom lane

pgsql-general by date:

Previous
From: Tony Grant
Date:
Subject: a date_part question
Next
From: greg@turnstep.com
Date:
Subject: Re: Mailing lists still points to a non-existent page