Serial data type
От | Christian Rengstl |
---|---|
Тема | Serial data type |
Дата | |
Msg-id | 474FF9E7.90AD.0080.0@klinik.uni-regensburg.de обсуждение исходный текст |
Ответы |
Re: Serial data type
Re: Serial data type Re: Serial data type |
Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: