Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous
Date: 2016-08-10 17:30:54
Message-ID: CAKFQuwYdosGF6grAZOgZLTNJuhimuiis0WbpH9Chk-T7uSojNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 10, 2016 at 1:19 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:

>
>
> 2016-08-10 19:05 GMT+02:00 Alexander Farber <alexander(dot)farber(at)gmail(dot)com>:
>
>> Thank you Adrian and others -
>>
>> I am trying to replace INSERT into temp table in my custom function by
>> RETURN NEXT, but get an error:
>>
>> CREATE OR REPLACE FUNCTION words_check_words(
>> IN in_uid integer,
>> IN in_gid integer,
>> IN in_tiles jsonb)
>> RETURNS TABLE(word varchar, score integer) AS
>> $func$
>> .......
>>
>> -- INSERT INTO _words(word, score)
>> -- VALUES (upper(_word), _score);
>>
>> RETURN NEXT (word, score);
>>
>>
>> ERROR: RETURN NEXT cannot have a parameter in function with OUT
>> parameters
>> LINE 98: RETURN NEXT (word, score);
>>
>
> This was limit in older version
>
>
​He's supposedly using 9.5​ which documents "RETURN NEXT expression;"

https://www.postgresql.org/docs/current/static/plpgsql-control-structures.html

Dave

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-08-10 17:35:52 Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous
Previous Message Pavel Stehule 2016-08-10 17:19:07 Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous