Re: FW: Re: [GENERAL] create temp in function

2008-04-23 Thread Kerri Reno
Thanks for all who helped me with this. I just upgraded our one remaining database to 8.2 and EXECUTE INTO worked great. THANKS! Kerri On 4/22/08, Klint Gore <[EMAIL PROTECTED]> wrote: > > Kerri Reno wrote: > > > So the reason I'm getting the error is that I'm running it in 8.0. > > Thanks so m

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Klint Gore
Kerri Reno wrote: So the reason I'm getting the error is that I'm running it in 8.0. Thanks so much for your help! Kerri use FOR instead CREATE OR REPLACE FUNCTION private.get_salary_schedule(integer, text) RETURNS record AS $BODY$ declare tcp_id alias for $1; tfy alias for $2; tbl

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
gt; > > > > > > > > > Jon > > > > > > > > > -- > > > > > > *From:* [EMAIL PROTECTED] [mailto: > > > [EMAIL PROTECTED] *On Behalf Of *Kerri Reno > > > *Sent:* Tuesday, April 22, 20

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Roberts, Jon
2008 8:27 AM To: Roberts, Jon Cc: pgsql-general@postgresql.org Subject: Re: FW: Re: [GENERAL] create temp in function http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN says SELECT INTO is not currently supported within EXECUTE. I was using a te

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Adrian Klaver
> > > > -- > > > > *From:* [EMAIL PROTECTED] [mailto: > > [EMAIL PROTECTED] *On Behalf Of *Kerri Reno > > *Sent:* Tuesday, April 22, 2008 7:55 AM > > *To:* pgsql-general@postgresql.org > > *Subject:* Re: FW: Re: [GENERAL]

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
I tried that, too, and got a different error. NOTICE: query: select salary_schedule, pay_column, step from saltab07 where cp_id =32 ERROR: syntax error at or near "$2" SQL state: 42601 Context: PL/pgSQL function "get_salary_schedule" line 15 at execute statement In the PG log file, it sa

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
D] *On Behalf Of *Kerri Reno > *Sent:* Tuesday, April 22, 2008 7:55 AM > *To:* pgsql-general@postgresql.org > *Subject:* Re: FW: Re: [GENERAL] create temp in function > > > > Thanks to all who responded. I now know why execute will help this > problem, but then it causes a new

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Roberts, Jon
To: pgsql-general@postgresql.org Subject: Re: FW: Re: [GENERAL] create temp in function Thanks to all who responded. I now know why execute will help this problem, but then it causes a new problem. The example I sent you was trivial, trying to get to the bottom of the issue. What I'm r

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Pavel Stehule
Hello On 22/04/2008, Kerri Reno <[EMAIL PROTECTED]> wrote: > Thanks to all who responded. I now know why execute will help this problem, > but then it causes a new problem. The example I sent you was trivial, > trying to get to the bottom of the issue. What I'm really trying to is get > past th

Re: FW: Re: [GENERAL] create temp in function

2008-04-22 Thread Kerri Reno
Thanks to all who responded. I now know why execute will help this problem, but then it causes a new problem. The example I sent you was trivial, trying to get to the bottom of the issue. What I'm really trying to is get past the restriction of execute to do SELECT INTO. That's why I created a

Re: [GENERAL] create temp in function

2008-04-21 Thread A. Kretschmer
am Mon, dem 21.04.2008, um 15:22:52 -0600 mailte Kerri Reno folgendes: > But if I create and run the following function, it bombs on the second run. > It > gives me: > compassdevel_lb=# select testtemp(); > NOTICE: relid: 186270497 > NOTICE: count: 0 > testtemp > -- > t > (1 row) >

Re: FW: Re: [GENERAL] create temp in function

2008-04-21 Thread Adrian Klaver
: [EMAIL PROTECTED] (Adrian Klaver) > > To: "Kerri Reno" <[EMAIL PROTECTED]> > > Subject: Re: [GENERAL] create temp in function > > Date: Mon, 21 Apr 2008 23:01:53 + > > > -- Original message -- > > > From: "K

Re: FW: Re: [GENERAL] create temp in function

2008-04-21 Thread Alvaro Herrera
Kerri Reno wrote: > Adrian, > > I don't understand. Why do I need to use execute? It's a Postgres shortcoming. It's fixed in 8.3 so if it annoys you too much you can just upgrade. > It runs fine the first > time. The second time it bombs, because it's not seeing schedrec > correctly. Which p

Re: FW: Re: [GENERAL] create temp in function

2008-04-21 Thread Kerri Reno
e: > > Forgot to hit reply all. > > - Forwarded Message: -- > From: [EMAIL PROTECTED] (Adrian Klaver) > To: "Kerri Reno" <[EMAIL PROTECTED]> > Subject: Re: [GENERAL] create temp in function > Date: Mon, 21 Apr

FW: Re: [GENERAL] create temp in function

2008-04-21 Thread Adrian Klaver
Forgot to hit reply all. - Forwarded Message: -- From: [EMAIL PROTECTED] (Adrian Klaver) To: "Kerri Reno" <[EMAIL PROTECTED]> Subject: Re: [GENERAL] create temp in function Date: Mon, 21 Apr 2008 23:01:53 + >

[GENERAL] create temp in function

2008-04-21 Thread Kerri Reno
Hi All! I'm new to this list, but I've been using PG for a couple of years now. I'm trying to do something in a function that I just can't seem to do. If I do the following in psql or pgadmin: create temp table schedrec (sch text, cl text, st text); select distinct(attrelid) from pg_attribute w