Re: a column definition list is required for functions returning "record"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: a column definition list is required for functions returning "record"
Date: 2016-08-26 15:29:35
Message-ID: 18721.1472225375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alexander Farber <alexander(dot)farber(at)gmail(dot)com> writes:
> in 9.5.3 I have defined the following custom function:

> CREATE OR REPLACE FUNCTION words_select_games(IN in_uid integer)
> RETURNS SETOF RECORD AS

> I have also unsuccessfully tried
> RETURNS SETOF words_games, words_moves AS

> How would you recommend to fix my declaration problem please?

I think you are looking for the RETURNS TABLE syntax.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2016-08-26 15:32:12 Re: a column definition list is required for functions returning "record"
Previous Message Alexander Farber 2016-08-26 15:20:37 a column definition list is required for functions returning "record"