pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: use of OID.Unknown
Date: Tue, 08 Nov 2005 13:52:05 -0500
Message-ID: <7620.1131475925@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.61.0511081318120.13491@leary.csoft.net>
References: <A9FB7703-8451-4B03-AC70-178F793DF78E@fastcrypt.com>
	<Pine.BSO.4.61.0511081208530.3766@leary.csoft.net>
	<22E34B35-1D29-4DCD-BF81-8AF3CFEAC94B@fastcrypt.com>
	<Pine.BSO.4.61.0511081318120.13491@leary.csoft.net>

Kris Jurka <books@ejurka.com> writes:
> I don't think this is a simple switch we should throw in a minor revision 
> either.  The real source of our problems is that for performance reasons 
> we never issue a Describe Statement protocol message.

No, I don't think that's the issue; the part that I'm worried about is
this one:

> Finally there are a few cases where the server simply cannot resolve the 
> provided type and bails out with an error message.  If using the JDBC 
> setXXX provided types, these work.  Consider "SELECT ? IS NULL" or an 
> overloaded function that cannot be resolved.

Sending UNKNOWN creates a risk that the server will barf because it
can't guess the right data type.

Now, if you are proposing to send a parameter marked UNKNOWN in exactly
the same cases where the previous driver release would have sent an
undecorated string literal, then I'm mostly OK with it --- the behavior
at least won't be a regression, because an undecorated string literal
is also taken as UNKNOWN to start with.

I remembered what it was that was nagging me about having seen this
before --- didn't we try using UNKNOWN to avoid having to choose between
timestamp with/without time zone, and didn't that idea crash and burn?
It'd be a good idea to go back and look at the details before thinking
of adopting UNKNOWN in a more general context.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <7620.1131475925@sss.pgh.pa.us>
Permalink:  ../7620.1131475925@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7620.1131475925@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, books@ejurka.com, pg@fastcrypt.com
  Subject: Re: use of OID.Unknown
  In-Reply-To: <7620.1131475925@sss.pgh.pa.us>
  References: <A9FB7703-8451-4B03-AC70-178F793DF78E@fastcrypt.com> <Pine.BSO.4.61.0511081208530.3766@leary.csoft.net> <22E34B35-1D29-4DCD-BF81-8AF3CFEAC94B@fastcrypt.com> <Pine.BSO.4.61.0511081318120.13491@leary.csoft.net> <7620.1131475925@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox