Dear All,
Using pg 7.3.4, Sun jvm 1.4.1_02 and either pg73jdbc3.jar or
pg73jdbc2.jar on Linux Debian Woody I experiencing some problems when
creating a table via JDBC.
This statement: CREATE TABLE testtable(
cd_id serial NOT NULL PRIMARY KEY,
cd_structure BYTEA NOT NULL,
cd_smiles VARCHAR(1000) NULL,
cd_formula VARCHAR(100) NULL,
cd_molweight float8 NULL,
cd_fp1 int4 NOT NULL
);
works fine from rsql, but using JDBC I will have an error:
java.sql.SQLException: ERROR: current transaction is aborted, queries
ignored until end of transaction block
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
As far as I can see, it is because when creating the table a NOTICE will
be printed like:
NOTICE: CREATE TABLE will create implicit sequence 'asdasd_cd_id_seq' for
SERIAL column 'asdasd.cd_id'
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
'asdasd_pkey' for table 'asdasd'
that is interpreted as an exception in JDBC. Is there a way to get rid of
this?
Cheers:
Szilva