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

Re: return setof record - strange behavior

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pawel Socha" <pawel(dot)socha(at)gmail(dot)com>
Cc: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: return setof record - strange behavior
Date: 2008-08-04 13:59:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
"Pawel Socha" <pawel(dot)socha(at)gmail(dot)com> writes:
> 2008/8/4 Marcin Krawczyk <jankes(dot)mk(at)gmail(dot)com>
>> Hi everybody. Can anyone enlighten me what's wrong with this function :

> [ you didn't do "RETURN next w;" ]

IIRC the other way is to assign to the output parameters by name, then
do RETURN NEXT with no argument.  But the FOR-loop all by itself isn't
going to return any data to the function's caller.

			regards, tom lane

In response to

pgsql-sql by date

Next:From: Richard BroersmaDate: 2008-08-04 14:05:25
Subject: Re: Case Insensitive searches
Previous:From: Mike GouldDate: 2008-08-04 13:54:38
Subject: Case Insensitive searches

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