Re: Why not working under 8.3 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Why not working under 8.3
Date
Msg-id 1403534381.4745581236182756172.JavaMail.root@sz0030a.emeryville.ca.mail.comcast.net
Whole thread Raw
In response to Why not working under 8.3  ("Andreas Moeller" <a.moeller@teia.de>)
Responses Re: Why not working under 8.3  (Adrian Klaver <aklaver@comcast.net>)
Re: Why not working under 8.3  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
----- "Andreas Moeller" <a.moeller@teia.de> wrote:

> Following lines produce an error message under 8.3. - but not under
> 8.1.
> Why?
>
> CREATE OR REPLACE FUNCTION dodi() RETURNS boolean AS
> $$
> BEGIN
> SELECT 'abc' INTO TEMPORARY foonana;
> RETURN FALSE;
> END;
> $$
> LANGUAGE 'plpgsql';
>
>
> FEHLER: syntax error at "TEMPORARY"
> DETAIL: Expected record variable, row variable, or list of scalar
> variables following INTO.
> CONTEXT: compile of PL/pgSQL function "dodi" near line 2
>
> ********** Fehler **********
>
> FEHLER: syntax error at "TEMPORARY"
> SQL Status:42601
> Detail:Expected record variable, row variable, or list of scalar
> variables following INTO.
> Kontext:compile of PL/pgSQL function "dodi" near line 2

Are you sure this worked in 8.1? SELECT INTO in plpgsql needs to point to a variable as noted by the error message. You
needto declare a variable. 

pgsql-general by date:

Previous
From: "Andreas Moeller"
Date:
Subject: Why not working under 8.3
Next
From: Adrian Klaver
Date:
Subject: Re: Why not working under 8.3