Re: PL/pgSQL: How to return two columns and multiple rows

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chris Travers <chris(dot)travers(at)gmail(dot)com>
Cc: Sven Geggus <lists(at)fuchsschwanzdomain(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/pgSQL: How to return two columns and multiple rows
Date: 2015-06-18 13:15:34
Message-ID: CAKFQuwYHvLJUMvuM6+bjdeZLBPA2KX2oAy4WZ=YNCj-F8=nEwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, June 18, 2015, Chris Travers <chris(dot)travers(at)gmail(dot)com> wrote:
>
>
> Select (myfunc('foo','bar')).*;
>
>
>
This should be avoided. Use lateral instead,or a cte a/o offset 0.
My_func is evaluated twice (once per column) if called this way

>
> Or
> Select * from myfunc('foo','bar');
>

This is ok

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sven Geggus 2015-06-18 13:32:04 Re: PL/pgSQL: How to return two columns and multiple rows
Previous Message Merlin Moncure 2015-06-18 13:10:13 Re: PL/pgSQL: How to return two columns and multiple rows