Обсуждение: example.datestyle on 7.4?

Поиск
Список
Период
Сортировка

example.datestyle on 7.4?

От
Larry Rosenman
Дата:
I'm new to jdbc, so please be gentle....

I'm playing with a Beta version of Java 1.4.2 on UnixWare, and was playing
with the examples/ directory.  Running the datestyle test:

$ java example.datestyle jdbc:postgresql:ler <id> <pw>
PostgreSQL datestyle test v6.3 rev 1

Connecting to Database URL = jdbc:postgresql:ler
Connected...Now creating a statement

Running tests:
Test 0 - postgres,europeanException caught.
org.postgresql.util.PSQLException: A result was returned when none was
expected.
org.postgresql.util.PSQLException: A result was returned when none was
expected.
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Stat
ement.java:273)
        at
org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1Stat
ement.java:257)
        at example.datestyle.doexample(datestyle.java:125)
        at example.datestyle.<init>(datestyle.java:53)
        at example.datestyle.main(datestyle.java:178)
$

Does this example need mods for 7.4?

LER

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Вложения

Re: example.datestyle on 7.4?

От
Kris Jurka
Дата:

On Fri, 14 Nov 2003, Larry Rosenman wrote:

> I'm new to jdbc, so please be gentle....
>
> I'm playing with a Beta version of Java 1.4.2 on UnixWare, and was playing
> with the examples/ directory.  Running the datestyle test:
>
> $ java example.datestyle jdbc:postgresql:ler <id> <pw>
> PostgreSQL datestyle test v6.3 rev 1
>
> Connecting to Database URL = jdbc:postgresql:ler
> Connected...Now creating a statement
>
> Running tests:
> Test 0 - postgres,europeanException caught.
> org.postgresql.util.PSQLException: A result was returned when none was
> expected.
>
> Does this example need mods for 7.4?

This was actually broken during the 7.3 release when SHOW results changed
from being returned in a NOTICE to being a query result.  As the initial
message indicates "PostgreSQL datestyle test v6.3 rev 1"  This code was
actually written for the 6.3 jdbc driver and according to the cvs logs it
hasn't been changed since except to reformat the code.

The example directory is really a primitive version of the full junit
regression test suite we have now in org.postgresql.test.  I think we
could easily do away with the example directory unless people are actually
using it for examples.

Kris Jurka