Re: Bug? report : PreparedStatement.setObject(java.util.Date) don't work

From: dmp <danap(at)ttc-cmc(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug? report : PreparedStatement.setObject(java.util.Date) don't work
Date: 2007-11-09 20:40:13
Message-ID: 4734C5AD.7090506@ttc-cmc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

First I would like to say I'm new to PostgreSQL, so I may not have a
clue of what I'm taking
about, but I have done some reading in the manual and have been testing
the various data
types in PostgreSQL with MyJSQLView. These comments are just notes about
what I have
found, I don't know if these are bugs, or standard behavior. In the end
it will not matter
because I will find ways around them in the application.

Data Types: I do not consider geometric, network address, other objects
to be standard primary
data types. These objects are not defined in most languages as types and
they are not defined
in the java.sql types. As the gentleman states in is problem PostgreSQL
seems to be strongly
typed and does not appear to allow set'type'() in preparedstatements to
be allowed unless the
argument for data is of same type as set. This seems fine, but the
non-standard types, ex.
geometric, must then be created. Unfortunately these types do not exist
in the standard java
language which seems to me they then must be imported from postgresql or
created via new classes.
This also is not a major problem, but in the first I must document to
users the need for additional
dependencies or in the latter add classes to the program, I would prefer
to keep things as simple
as possible. I have already found a way around this for the the network
address types, and just not
decided on how to handle with geometric types until I've done some more
reading.

The test database tables and main class used with regard to this subject
in MyJSQLView may be
obtained from the CVS repository for MyJSQLView at
http://myjsqlview.cvs.sourceforge.net/myjsqlview/
Of course the whole app. may also be checked out to run the program on
the test databases tables.
The import SQL feature will work for loading the test tables in the
current development.

Same type of error I believe as posted:

MyJSQLView_Main createGUI() Connection Created
MyJSQLView_Main createGUI() Connection Closed
TableTabPanel actionPerformed() Connection Created
TableTabPanel actionPerformed() Connection Closed
TableEntryForm addUpdateTableEntry() Connection Created
TableEntryForm addUpdateTableEntry()
SQLException: ERROR: column "point_type" is of type point but expression
is of type character varying
SQLState: 42804
VendorError: 0
TableEntryForm addUpdateTableEntry() rollback Connection Closed

files: MyJSQLView/test/postgresqlTypes.sql
MyJSQLView/test/postgresqlTypes_loadTest.sql
MyJSQLView/src/Panels/net/danap/myjsqlview/TableEntryForm.java
Class Method addUpdateTableEtnry().

danap

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2007-11-10 01:27:15 Re: Bug? report : PreparedStatement.setObject(java.util.Date) don't work
Previous Message 雨森郷太郎 2007-11-09 16:48:08 Bug? report : PreparedStatement.setObject(java.util.Date) don't work