Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Serial data type



Hi everyone,

in my Java app at certain points INSERT queries are built dynamically,
but now i am facing a problem when the target table contains a SERIAL
field where NULL values are not allowed. Therefore I have two questions:

1) How can I find out if there is a serial field in a table, as
getColumnType() in ResultSetMetaData does not return a field indicating
SERIAL as far as I could see?
2) Why does it not work to issue a query like INSERT INTO
x(serial_field) VALUES(NULL) as the default of the "serial_field" is
nextval() anyway?

Thanks! 


Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230






Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group