Re: A bad behavior under autocommit off mode

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Barry Lind <blind(at)xythos(dot)com>, Neil Conway <neilc(at)samurai(dot)com>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A bad behavior under autocommit off mode
Date: 2003-03-22 05:03:27
Message-ID: 27788.1048309407@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Actually, looking at this email, having a SET that is unchangeable would
> fix the issues with autocommit, datestyle, and client encoding for jdbc.

> The basic issue is that certain interfaces want to set these parameters
> as unchangeable, and that would allow this.

I'm not sure they need these parameters to be *unchangeable*. What they
need is to *know what they are*, with certainty. The notion of issuing
an automatic report message whenever the values change would seem to
answer that.

On the other hand, that only directly solves the problem for a single
layer of client library. Imagine, say, a middleware layer built on top
of JDBC. If that layer wants to track the state of DATESTYLE, or any
other parameter, do these mechanisms help it? No, unless JDBC exposes
the parameter-update-reporting protocol ... which it probably won't
because that's not part of the JDBC API spec.

When you look at the problem in terms of N levels of client-side code,
I fear that none of the ideas we've discussed really provide a
satisfactory answer. Reporting doesn't work unless the reports
propagate all the way up the client stack. "Unchangeable params" don't
work --- which level gets to dictate the actual setting, and how do the
other levels learn what it is?

Any thoughts about it?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-22 05:26:04 Re: PQescapeBytea on Win32
Previous Message Christopher Kings-Lynne 2003-03-22 04:47:43 Re: ALTER TABLE / CLUSTER ON