Re: ERROR: query has no destination for result data - Mailing list pgsql-general

From Craig Ringer
Subject Re: ERROR: query has no destination for result data
Date
Msg-id 50AF5662.2080402@2ndQuadrant.com
Whole thread Raw
In response to Re: ERROR: query has no destination for result data  (Peter Kroon <plakroon@gmail.com>)
Responses Re: ERROR: query has no destination for result data  (Peter Kroon <plakroon@gmail.com>)
List pgsql-general
On 11/23/2012 06:53 PM, Peter Kroon wrote:
When using:
RETURN QUERY(
SELECT 'this is text'
);

I get another error: 
ERROR:  cannot use RETURN QUERY in a non-SETOF function

Use a plain SQL function instead of PL/PgSQL, or use `SELECT INTO` and ordinary `RETURN`.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services

pgsql-general by date:

Previous
From: Peter Kroon
Date:
Subject: Re: ERROR: query has no destination for result data
Next
From: Pavel Stehule
Date:
Subject: Re: ERROR: query has no destination for result data