Re: [BUGS] BUG #5032: unexpected syntax error for plpgsql function returns table

2009-09-03 Thread Keith Cascio
comment on the fact that the following code succeeds: create function reproduce() returns table(foo integer) language plpgsql as 'begin return query select 1 bar; end;'; Output in psql is: CREATE FUNCTION Why should it succeed with bar but not with foo? Thanks, Keith 2009/9/3 Keith Cascio ke

Re: [BUGS] BUG #5032: unexpected syntax error for plpgsql function returns table

2009-09-03 Thread Keith Cascio
Pavel, On Thu, 3 Sep 2009, Pavel Stehule wrote: 2009/9/3 Keith Cascio ke...@cs.ucla.edu: Why should it succeed with bar but not with foo? because bar isn't declared as variable I understand now. returns table(v1 t1, v2 t2,...) is equivalent to declaring OUT parameters, therefore foo

[BUGS] BUG #5032: unexpected syntax error for plpgsql function returns table

2009-09-02 Thread Keith Cascio
The following bug has been logged online: Bug reference: 5032 Logged by: Keith Cascio Email address: ke...@cs.ucla.edu PostgreSQL version: 8.4.0 Operating system: CentOS 5.3 (Linux) Description:unexpected syntax error for plpgsql function returns table Details: Do