From: dmp <danap@ttc-cmc.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Bug? report : PreparedStatement.setObject(java.util.Date) don't work
Date: Fri, 09 Nov 2007 13:40:13 -0700
Message-ID: <4734C5AD.7090506@ttc-cmc.net> (raw)
In-Reply-To: <3a69fa320711090848n7d51dc57td54f23e0754679cb@mail.gmail.com>
References: <3a69fa320711090848n7d51dc57td54f23e0754679cb@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: danap@ttc-cmc.net
Subject: Re: Bug? report : PreparedStatement.setObject(java.util.Date) don't work
In-Reply-To: <4734C5AD.7090506@ttc-cmc.net>
References: <3a69fa320711090848n7d51dc57td54f23e0754679cb@mail.gmail.com> <4734C5AD.7090506@ttc-cmc.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox