Re: COPY support in pgsql-jdbc driver

From: Michael Adler <adler(at)glimpser(dot)org>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: COPY support in pgsql-jdbc driver
Date: 2002-06-25 16:00:00
Message-ID: Pine.NEB.4.44.0206241641380.10098-100000@reva.sixgirls.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Thanks for your response Barry. I've been working on this as time allows.
I am determined to get it eventually.

> 6) Some debugging output would probably be usefull as well, (see current
> sources and the isDebug method and how it is used).

I can't find that method anywhere in the current CVS source. Can you help
me out?

> 7) The testcase should be done using junit and added to the tests under
> org/postgresql/test

I'd like to get this done immediately, but I'm having some trouble with
the tests.

test:
[junit] ..............F......................F.....
[junit] ............
[junit] Time: 4.897
[junit] There were 2 failures:
[junit] 1) testCapabilities(org.postgresql.test.jdbc2.DatabaseMetaDataTest)junit.framework.AssertionFailedError
[junit] at org.postgresql.test.jdbc2.DatabaseMetaDataTest.testCapabilities(DatabaseMetaDataTest.java:104)
[junit] 2) testSetTimestamp(org.postgresql.test.jdbc2.TimestampTest)junit.framework.AssertionFailedError
[junit] at org.postgresql.test.jdbc2.TimestampTest.timestampTest(TimestampTest.java:120)
[junit] at org.postgresql.test.jdbc2.TimestampTest.testSetTimestamp(TimestampTest.java:92)

[junit] FAILURES!!!
[junit] Tests run: 53, Failures: 2, Errors: 0

DatabaseMetaDataTest.java:104
assertTrue(!dbmd.supportsANSI92EntryLevelSQL());

TimestampTest.java:120
assertTrue(rs.next());
t = rs.getTimestamp(1);
assertNotNull(t);
assertTrue(t.equals(getTimestamp(1950, 2, 7, 15, 0, 0, 0)));

> 8) Need to decide how to handle character set conversions, since you are
> not currently doing any character set conversions for either the input
> or output.

I agree that these methods should support conversion with options to disable
conversion if it turns out to be taxing.

> Reading one byte at a time from the stream will be slow, that is why it
> would be better to read into a buffer.

Are you suggesting that I create a BufferedInputStream inside the method? I was
planning on optimizing after the code and tests had become reliable enough to
take benchmarks.

Thanks again for the feedback.

Mike

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2002-06-25 16:11:42 Re: [HACKERS] Definite bug in JDBC
Previous Message Barry Lind 2002-06-25 15:29:38 Re: Timestamp