Re: patch for COPY

From: Kris Jurka <books(at)ejurka(dot)com>
To: Michael Adler <adler(at)glimpser(dot)org>
Cc: Dave Cramer <Dave(at)micro-automation(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>, Barry Lind <blind(at)xythos(dot)com>
Subject: Re: patch for COPY
Date: 2003-02-09 09:21:29
Message-ID: Pine.LNX.4.33.0302090411020.29526-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sat, 8 Feb 2003, Michael Adler wrote:
>
> On Fri, 7 Feb 2003, Kris Jurka wrote:
> > One of the failings of the copy protocol is that on error basically the
> > connection is hosed. Is it possible to reset the connection state on
> > error for the user?
>
> Assuming the rest of the driver can support this behavior, I'm guess that
> we should make this optional.

That's the question. Can we reset the driver to a close enough state that
it is transparent to the user. With normal JDBC access the user will
expect to get an SQLException call connection.rollback() and continue as
usual. This could be tricky.

> > Also are there plans to support other elements of the COPY syntax? For
> > example NULL AS, OIDS, and column lists.
>
> Yes. My current thinking is to provide a method that takes an arbitrary
> COPY command. This also gives us backwards compatibility since the command
> syntax has changed from 7.2 to 7.3.

What is the expected use case for a copyIn? Is an InputStream a
reasonable means for input. Would defining a CopyInputSource interface
for a user's class to implement be useful? The JDBC driver could then
pull data directly from the user's representation without an intermediate
persistance to the InputStream.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-02-09 09:31:19 Re: debugging prepared statements
Previous Message Kris Jurka 2003-02-09 09:10:46 Re: PreparedStatement.executeBatch() error? 7.3