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

Re: Error in returning setof records

From: Richard Huxton <dev(at)archonet(dot)com>
To: Anjali Arora <anjalia(at)cdac(dot)in>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Error in returning setof records
Date: 2006-04-27 15:16:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Anjali Arora wrote:
> Hi all,
> when i am returning function as setof record then it will give error
> "ERROR:  set-valued function called in context that cannot accept a set
> CONTEXT:  PL/pgSQL function "gfs_ls" while casting return value to
> function's return type"

This is not a bug - see the manuals for details.

A set returning function is like a table so you need to call it as:
   SELECT * FROM my_set_function();

For general help you might like to try the general/sql mailing lists 
rather than the bug tracker.
   Richard Huxton
   Archonet Ltd

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2006-04-27 22:31:34
Subject: Re: [BUGS] BUG #2401: spinlocks not available on amd64
Previous:From: Bruce MomjianDate: 2006-04-27 02:41:48
Subject: Re: prepare-alter-exec issue

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