From: | Michal Szymanski <dyrex(at)poczta(dot)onet(dot)pl> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to use RETURN TABLE in Postgres 8.4 |
Date: | 2009-07-05 13:51:36 |
Message-ID: | 9dc3d408-1734-4989-a26e-bd3ef59f052c@a36g2000yqc.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Michal Szymanski <dy(dot)(dot)(dot)(at)poczta(dot)onet(dot)pl> writes:
> > CREATE OR REPLACE FUNCTION buggy_procedure() RETURNS TABLE (id INT8,
> > test VARCHAR)
> > AS $$
> > BEGIN
> > -- @todo hide password
> > RETURN QUERY
> > SELECT id ,test
> > FROM bug_table
> > ;
> > END;
> > $$
> > LANGUAGE plpgsql STRICT SECURITY DEFINER;
>
> Don't use column names in your functions that are the same as variable
> or parameter names of the function. This is working basically as if
Thank you, now it works. Using RETURNS TABLE will resolve my other
problem related to the bug/functionality of Postgres -
http://groups.google.pl/group/pgsql.bugs/browse_thread/thread/0647bde500c1b782?hl=pl#
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2009-07-05 15:32:56 | Re: Will there be an official pg_migrator release? |
Previous Message | Joost Kraaijeveld | 2009-07-05 12:12:42 | Example of full text search ranking function somewhere? |