Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous - Mailing list pgsql-general

From Alexander Farber
Subject Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous
Date
Msg-id CAADeyWhHsMsX6UqfEn29BAgbfHq1Hpgi2Hcx_L+Y6OTQA9cVKw@mail.gmail.com
Whole thread Raw
In response to Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
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);

Regards
Alex

pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Should a DB vacuum use up a lot of space ?
Next
From: Adrian Klaver
Date:
Subject: Re: RETURNS TABLE function: ERROR: column reference "word" is ambiguous