On Mar 27, 2006, at 5:41 AM, Markus Schaber wrote:

navteq=# select foo,generate_x(bar) from test;
ERROR:  set-valued function called in context that cannot accept a set
CONTEXT:  PL/pgSQL function "generate_x" line 5 at return next

However, it is fine to call other set returning functions in the same
context:


With SRFs, you need to specify what you want to select. In other words if you are calling generate_x(bar) you need "select * from generate_x(bar)" -- "select generate_x(bar)" will not work.

So for your query I think you need something like:

select foo, (select x from generate_x(bar)) from test;



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to