Re: PREPARE vs query with MULTIPLE statements - Mailing list pgsql-hackers

From Andrei Kovalevski
Subject Re: PREPARE vs query with MULTIPLE statements
Date
Msg-id 4743CBE6.5070705@commandprompt.com
Whole thread Raw
In response to Re: PREPARE vs query with MULTIPLE statements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Yes, Thank you!

Tom Lane wrote:
> Andrei Kovalevski <andyk@commandprompt.com> writes:
>   
>> 2) If I send it as 'PREPARE "SQL_CUR1" AS SELECT 1; SELECT 2; SELECT3; 
>> SELECT4;' and then 'EXECUTE "SQL_CUR1" - I'm getting:
>> - results for SELECT 1; SELECT2; SELECT 3;
>> - ReadyForQuery response
>> - results for SELECT 4;
>> - one more ReadyForQuery response
>> from backend
>>     
>
>   
>> Is this behavour is correct and expected?
>>     
>
> You seem to have some odd ideas about what the semicolons mean.
> The prepare command there is PREPARE "SQL_CUR1" AS SELECT 1
> ... no more and no less.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>   



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PREPARE vs query with MULTIPLE statements
Next
From: "Albe Laurenz"
Date:
Subject: Re: backup_label and server start