Re: how to return results from code block - Mailing list pgsql-general

From Adrian Klaver
Subject Re: how to return results from code block
Date
Msg-id 4FEF0BFB.6050101@gmail.com
Whole thread Raw
In response to how to return results from code block  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
On 06/30/2012 03:17 AM, Andrus wrote:
> How to return single row or results from code block executed using
> ADO.NET ExecuteQuery() method.
> I tried
> DO $$
> declare
>    i integer :=0;
> begin
> select i+1 as res1, i+2 as res2;
> END$$;
> but got error:
> ERROR: query has no destination for result data
> How to return single row result from code pgsql  code block ?
> Andrus.

Oops that should have been:

raise notice 'The results are %,%', rec.res1,rec.res2



--
Adrian Klaver
adrian.klaver@gmail.com



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: how to return results from code block
Next
From: Edson Richter
Date:
Subject: Complex database infrastructure - how to?