From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jaka Jančar <jaka(at)kubje(dot)org> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Sync vs Flush |
Date: | 2020-07-02 16:41:22 |
Message-ID: | 856654.1593708082@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
=?UTF-8?B?SmFrYSBKYW7EjWFy?= <jaka(at)kubje(dot)org> writes:
> For an extended query that needs to get parameter types before sending
> them, is there a difference in doing:
> Parse, Describe statement, Flush, Bind, Execute, Sync
> vs
> Parse, Describe statement, Sync, Bind, Execute, Sync
Sync is a resync point after an error, so the real question is what
you want to have happen if you get some kind of error during the Parse.
If you expect that the app wouldn't proceed with issuing Bind/Execute
then you want to do it the second way.
I suppose you could do
Send Parse/Describe/Flush
Read results
If OK:
Send Bind/Execute/Sync
else:
Send Sync # needed to get back to normal state
but that doesn't sound all that convenient.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-07-02 16:51:24 | Re: cannot restore schema with is not distinct from on hstore since PG 9.6.8 |
Previous Message | Dave Cramer | 2020-07-02 16:41:14 | Re: Binary support for pgoutput plugin |