Re: set returning function with variable argument - possible?

From: Frank Miles <fpm(at)u(dot)washington(dot)edu>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: set returning function with variable argument - possible?
Date: 2011-06-18 20:50:44
Message-ID: alpine.LRH.2.01.1106181349500.17307@homer03.u.washington.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 16 Jun 2011, David Johnston wrote:

> The only way to feed another relation into a function is to place the
> function in the SELECT list. If you then want to expand the result of the
> function call you alias the function result and then ".*" against it.
>
> WITH feeder AS (
> SELECT f(var) AS result FROM xtable WHERE ...
> )
> SELECT (feeder.result).*
> FROM feeder
> ;

[snip]

Thanks, David, this worked perfectly! {thanks also to Pavel}

-Frank

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daron Ryan 2011-06-18 21:51:37 Search for lists
Previous Message Greg Smith 2011-06-18 17:12:34 Re: While converting the Master to Standby , FATAL: timeline 2 of the primary does not match recovery target timeline 1