From: | "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl> |
---|---|
To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [Re] Re: PREPARE and transactions |
Date: | 2004-07-05 11:24:20 |
Message-ID: | 20040705112420.GA50626@xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 05, 2004 at 10:21:26AM +1200, Oliver Jowett wrote:
> It certainly affects the JDBC driver -- the native String representation
> in Java is UTF-16, so the driver transcodes between that and
> client_encoding for parameterized queries and query results involving
> strings.
Oops, yeah, I forgot. So perhaps we should be distinguishing several
layers in a session's state, along the lines of:
SQL session - temp tables, session variables, database contents
Interchange - encoding & representation
Protocol - COPY, bind/execute &c.
Connection - socket stuff
> So at least from that point of view, client_encoding is very much a
> protocol-level thing. Much as I see PREPARE :)
The Interchange layer is the ugly stepchild here; it's controlled at the
SQL level but should be handled either by the application or in middleware,
together with the Protocol layer. The model really seems to assume that it
belongs in the application, which in your case of course is not an option.
If they were placed at the driver level (together with Protocol) then I'd
see how they might as well be nontransactional. Are there even significant
uses of session variables other than controlling the Interchange layer?
Transactions come into play at the Protocol level, and the way things are
implemented, go all the way up to SQL level. Only the Connection level is
entirely nontransactional, and the SQL layer to my intuition ought to be
exclusively transactional. The only current exception to that that springs
to mind is the way PREPARE is implemented.
Jeroen
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-07-05 11:44:08 | Re: [Re] Re: PREPARE and transactions |
Previous Message | Najib Abi Fadel | 2004-07-05 10:23:28 | creating a complex aggregate function |