Re: Function problem - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Function problem
Date
Msg-id web-830256@davinci.ethosmedia.com
Whole thread Raw
In response to Function problem  ("Patrick Hatcher" <PHatcher@macys.com>)
List pgsql-novice
Partrick,

> This a snippet of a much longer procedure.  I am creating a cross-tab
>  of
> sales data and dumping it into a temp table.  A bunch of other temp
>  tables
> are created and then the whole thing is put together in 1 table for
> reporting purposes.  As stated earlier, it works if I don't put it
>  into a
> function and I think it has to do with my quotes (").

No, the problem is that SELECT INTO in a procedure is for selecting
 data into variables.  PL/pgSQL is expecting a variable named "TEMP"
 and not finding one.  Instead, how about using the more standard
 CREATE TABLE AS SELECT ... ?

-Josh Berkus

pgsql-novice by date:

Previous
From: "Patrick Hatcher"
Date:
Subject: Re: Function problem
Next
From: "Patrick Hatcher"
Date:
Subject: Re: Function problem