Multiple line query results in postgres

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multiple line query results in postgres

Thushar

Hi all,

 

I noticed was that in the PostgreSQLEXDISession =>> getColumnDescriptionExternal: method is responsible for getting the record from the queried result. But I found that on using multiple query statements in a single query string input, it will fetch the data as required i.e. each statement will be executed individually but only the first statement result will be available. This is because the class PostgreSQLQueryResultList gets the first result from an ordered collection of results.

 

The code

 

Begin transaction;

Select * from myTable where myField = A FOR UPDATE;

 

 

when executed through ad-hoc will return a  #noAnswerSream  and thus no results will be displayed whereas in direct use if the query on to postgres will return the select query answer. This is happening since the code returns 2 objects of results and only the first one is taken as answer.

 

Please correct me if I am wrong. Why this is made so since we will be always expecting the result of the last statement in a multiple statement query as I have given above.

 

 Thanks n regards,

 

G R Thushar,

Iva Systems.