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

From Peter Kroon
Subject Re: ERROR: query has no destination for result data
Date
Msg-id CAOh+DO=KQreQHpKMqmcKCx6EkFwNJgBjpWGk-U_6BfVTRYs4-g@mail.gmail.com
Whole thread Raw
In response to Re: ERROR: query has no destination for result data  (Craig Ringer <craig@2ndQuadrant.com>)
Responses Re: ERROR: query has no destination for result data  (Craig Ringer <craig@2ndQuadrant.com>)
Re: ERROR: query has no destination for result data  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
When using:
RETURN QUERY(
SELECT 'this is text'
);

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


2012/11/23 Craig Ringer <craig@2ndquadrant.com>
On 11/23/2012 06:36 PM, Peter Kroon wrote:
Hello,

I wish to return the SELECT statement.
Ho can I achieve this?

RETURN QUERY.

See http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html
-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services

pgsql-general by date:

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