pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: Dave Smith <dave.smith@candata.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problem with fixed length fields.
Date: Sat, 23 Oct 2004 16:50:47 -0400
Message-ID: <27388.1098564647@sss.pgh.pa.us> (raw)
In-Reply-To: <417AC2C2.40605@opencloud.com>
References: <1098532450.2684.3.camel@davehome>
	<Pine.BSO.4.56.0410231239390.19312@leary.csoft.net>
	<26657.1098556819@sss.pgh.pa.us>
	<417AC2C2.40605@opencloud.com>

Oliver Jowett <oliver@opencloud.com> writes:
> Tom Lane wrote:
>> Can you refrain from assigning a type at all?

> Pushing on blindly with a Bind without knowing the actual type of the 
> parameters you're sending seems possible but dangerous. It'd preclude 
> using binary-format parameters for unknown types, at a minimum.

I had in mind doing this *only* for setString; you would essentially be
assuming that the resolved type was text, varchar, or char, which have
interchangeable binary formats.

It would probably be a good idea to do a Describe Statement to verify
that the parameter got resolved as one of those, but this need not add
a round-trip, since you could issue it with the Parse message.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <27388.1098564647@sss.pgh.pa.us>
Permalink:  ../27388.1098564647@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27388.1098564647@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, oliver@opencloud.com, books@ejurka.com, dave.smith@candata.com
  Subject: Re: Problem with fixed length fields.
  In-Reply-To: <27388.1098564647@sss.pgh.pa.us>
  References: <1098532450.2684.3.camel@davehome> <Pine.BSO.4.56.0410231239390.19312@leary.csoft.net> <26657.1098556819@sss.pgh.pa.us> <417AC2C2.40605@opencloud.com> <27388.1098564647@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