Re: PL/pgSQL 1.2

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Joel Jacobson <joel(at)trustly(dot)com>
Cc: Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Bruce Momjian <bruce(at)momjian(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL 1.2
Date: 2014-09-04 14:45:06
Message-ID: 54087AF2.3030401@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/04/2014 02:40 PM, Pavel Stehule wrote:
>
>
>
> 2014-09-04 14:37 GMT+02:00 Joel Jacobson <joel(at)trustly(dot)com
> <mailto:joel(at)trustly(dot)com>>:
>
>
>
> On 4 sep 2014, at 11:42, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com
> <mailto:pavel(dot)stehule(at)gmail(dot)com>> wrote:
>> 2014-09-04 11:22 GMT+02:00 Joel Jacobson <joel(at)trustly(dot)com
>> <mailto:joel(at)trustly(dot)com>>:
>>
>> The point was, RETURNS returns 1 while RETURNS SETOF returns
>> 0 .. n.
>>
>>
>> no RETURNS return "VALUE" (it is not a row) .. and in combination
>> with SELECT - value will be a row. RETURNS SETOF returns rows
>
> I intentionally excluded the data type of what is returned.
> 1 "VALUE" vs 0...n "VALUES"
> Do you still fail to see the point 1 "VALUE" is special in the
> context of what a function returns?
>
>
> sorry, I don't understand .. for me SRF functions are absolutly
> different monsters than scalar, array or composite function - so its
> impossible to compare it.
When looking from the other end of the problem, we are
using SELECT/INSERT/UPDATE/DELETE *SET statements* in pl/pgsql
when we really want scalars.

My understanding is that one main drivers of starting this thread
was wanting also guaranteed SCALAR versions of these.

And wanting them in a way that is easy to use.

Cheers

--
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-09-04 14:51:03 Re: Patch for psql History Display on MacOSX
Previous Message Michael Paquier 2014-09-04 14:33:39 Re: Better support of exported snapshots with pg_dump