Alexander Farber writes:
> If I'd like to always return exactly 1 row -
> why wouldn't just RETURN work?
Because RETURNS TABLE means it's RETURNS SETOF something,
which means the number of rows it produces is equal to the
number of RETURN NEXTs executed. RETURN, per se, has exactly
zero impact o
On 09/02/2016 10:35 AM, Alexander Farber wrote:
If I'd like to always return exactly 1 row -
why wouldn't just RETURN work?
(That's what I kept trying)
Because you are using RETURNS TABLE. Postgres(plpgsql) has no way of
knowing what number of rows you are going to return.
On Fri, Sep 2, 2
If I'd like to always return exactly 1 row -
why wouldn't just RETURN work?
(That's what I kept trying)
On Fri, Sep 2, 2016 at 7:27 PM, Pavel Stehule
wrote:
>
>
> 2016-09-02 19:21 GMT+02:00 Alexander Farber :
>
>> why doesn't this simple test function return a row with 42, NULL values:
>>
>> CR
2016-09-02 19:21 GMT+02:00 Alexander Farber :
> Good evening,
>
> please help me to figure out, why doesn't this simple test function return
> a row with 42, NULL values:
>
> CREATE OR REPLACE FUNCTION words_merge_users_2(
> IN in_users jsonb,
> IN in_ip inet
>
Good evening,
please help me to figure out, why doesn't this simple test function return
a row with 42, NULL values:
CREATE OR REPLACE FUNCTION words_merge_users_2(
IN in_users jsonb,
IN in_ip inet
) RETURNS TABLE (
out_uid integer,