Re: 8.1 and syntax checking at create time - Mailing list pgsql-hackers

From Tony Caduto
Subject Re: 8.1 and syntax checking at create time
Date
Msg-id 4315E955.2050506@amsoftwaredesign.com
Whole thread Raw
In response to Re: 8.1 and syntax checking at create time  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: 8.1 and syntax checking at create time
List pgsql-hackers
here is a case that does not work:

CREATE or REPLACE FUNCTION public.test_func9(out firstname varchar,out 
lastname varchar)
RETURNS SETOF pg_catalog.record AS
$BODY$
Declare
row record56;
BEGIN   for $0 in select '',description from common.common_groups   loop      -- firstname = row.description;      --
lastname= '';   RETURN NEXT;   end loop;
 
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;

notice the for in select, it's for sure wrong, but it raises no errors 
until I execute the function
also note the declaration for row, there is no record56 type, but it 
raises no errors at create.

here is my version string:

PostgreSQL 8.1beta1 on i686-pc-linux-gnu, compiled by GCC 
i686-pc-linux-gnu-gcc (GCC) 3.3.5-20050130 (Gentoo Linux 
3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)

Alvaro Herrera wrote:

>On Wed, Aug 31, 2005 at 11:39:48AM -0500, Tony Caduto wrote:
>  
>
>>I saw in the release notes that 8.1 is supposed to do function syntax 
>>checking at create rather than run time, but with the first beta this 
>>does not seem to work.  check function bodies is on by default in the 
>>postgresql.conf file.  Is there a setting that didn't make it into the 
>>conf file?
>>    
>>
>
>It works for me; care to submit an test case?
>
>  
>



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: 8.1 OUT params returning more than one row question
Next
From: Tom Lane
Date:
Subject: Re: 8.1 and syntax checking at create time