From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Neil Conway <neilc(at)samurai(dot)com> |
Subject: | Re: RETURN QUERY in PL/PgSQL? |
Date: | 2007-04-23 21:23:29 |
Message-ID: | 200704231423.29895.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Neil,
> This works, but it seems overly verbose. It occurred to me that we could
> easily add a new PL/PgSQL statement that evaluates a set-returning
> expression and adds *all* the resulting rows to the function's result
> set. For example:
>
> RETURN QUERY SELECT ...;
>
> I'm not sure of the right name: "RETURN ROWS" or "RETURN ALL" might also
> work. Of course, this is syntax sugar (and superficial sugar at that),
> but I believe this is a fairly common requirement.
>
> Comments?
Hmmm ... "ALL" is already a reserved word, so is unlikely to be a variable
name, yes? I'd think we could get some breakage on "ROWS". So I'd go for
"RETURN ALL".
Overall, I think this is worthwhile, but maybe not enough to bypass feature
freeze.
--
Josh Berkus
PostgreSQL @ Sun
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-23 21:26:48 | Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect |
Previous Message | Heikki Linnakangas | 2007-04-23 21:22:04 | Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect |