Lists: | pgsql-hackers |
---|
From: | Abhijit Menon-Sen <ams(at)oryx(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | which statements need bind/describe messages? |
Date: | 2008-08-09 10:27:42 |
Message-ID: | 20080809102742.GA12679@toroid.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
My client library sends Parse/Bind/Describe/Execute/Sync for each query,
unless it's using a previously-prepared statement, in which case it can
omit the Parse message.
For which statements can I also avoid sending Bind and Describe?
As far as I can tell, I can just send Parse/Execute/Sync for any utility
statements (i.e. those that are handled by ProcessUtility()) that do not
UtilityReturnsTuples(). Furthermore, I can omit Describe for ordinary
(i.e. without "returning") INSERT and DELETE and UPDATE. Right?
I could also omit Bind for any queries that do not have bind parameters,
except that I always want binary-format results; so I suppose I always
have to send Bind for non-utility statements.
Comments appreciated.
-- ams
From: | Abhijit Menon-Sen <ams(at)oryx(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: which statements need bind/describe messages? |
Date: | 2008-08-10 03:16:52 |
Message-ID: | 20080810031652.GA23798@toroid.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
At 2008-08-09 15:57:42 +0530, ams(at)oryx(dot)com wrote:
>
> For which statements can I also avoid sending Bind and Describe?
I can't avoid sending Bind because Execute needs a portal and Bind is
what creates one. Let's pretend I didn't mention Bind at all. Sorry.
-- ams