Skip site navigation (1) Skip section navigation (2)

Re: plpgsql function returning SETOF

From: "Johannes Brgmann" <johannes(at)jottbee(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: plpgsql function returning SETOF
Date: 2005-12-21 19:08:56
Message-ID: 5zek46b73r.fsf@jottbee.net (view raw or flat)
Thread:
Lists: pgsql-novice
Hello Tom,
hello novices and experts,

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> "Johannes Brügmann" <johannes(at)jottbee(dot)org> writes:
>> sorry, i missed the error message:
>
>>       bruegmann(at)traffic_nrw=# select feiertage(NULL);
>>       ERROR:  set-valued function called in context that cannot accept a set
>>       CONTEXT:  PL/pgSQL function "feiertage" line 30 at return next
>
> You need to do
> 	select * from your_function(...);
> not just
> 	select your_function(...);

yes, that's it! Now it works, yeaaaah!

Thanks a lot to you, Tom, for your immediate help!
Johannes


In response to

pgsql-novice by date

Next:From: Brad NicholsonDate: 2005-12-21 20:34:52
Subject: Re: Questions about server.
Previous:From: Johannes BrgmannDate: 2005-12-21 18:57:15
Subject: Re: plpgsql function returning SETOF

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group