From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | Michael Adler <adler(at)glimpser(dot)org> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: COPY support in pgsql-jdbc driver |
Date: | 2002-06-26 00:56:09 |
Message-ID: | 3D191129.1030408@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Michael,
I is great to hear that you plan to continue working on this. I look
forward to your contribution. I have some additional comments below.
Michael Adler wrote:
>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?
>
>
OK, I wasn't very explicit in my response. Here is an example:
if (Driver.logDebug) Driver.debug("your debug message here");
It is a static variable named logDebug and not a method named isDebug().
Debug output can be enabled by adding ?loglevel=2 to the jdbc URL(eg.
jdbc:postgresql://localhost:5432/pg?loglevel=2) (or you can use
loglevel=1 but that only prints out Info messages of which there
currently is only one - the driver version). This information hasn't
yet made it into the documentation, but it will before 7.3 is released.
>>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)));
>
>
>
I am not really sure about these test failures.
>>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.
>
There are multiple ways this could be done. I don't mean to suggest any
one is prefered at this point, but I believe this should be done. Doing
it later in the process seems very reasonable.
thanks,
--Barry
From | Date | Subject | |
---|---|---|---|
Next Message | John Metz | 2002-06-26 11:34:09 | Re: JDBC parse error |
Previous Message | Timothy Reaves | 2002-06-25 20:46:19 | Re: Posgresql - openoffice-JDBC |