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

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.

pgsql-general by date:

Previous
From: tuanhoanganh
Date:
Subject: Re: Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute
Next
From: Pavel Stehule
Date:
Subject: Re: how to return results from code block