|
|||||||||||
|
Re: [JDBC] Serial data type
From: Kris Jurka <books(at)ejurka.com>
Date: Fri Nov 30 2007 - 06:01:30 EST On Fri, 30 Nov 2007, Christian Rengstl wrote: > in my Java app at certain points INSERT queries are built dynamically, getColumnType returns a value from java.sql.Types, which doesn't have SERIAL so there is no way to return it. ResultSetMetaData.getColumnTypeName() should probably return serial, but it doesn't at the moment. ResultSetMetaData.isAutoIncrement() will work as will DatabaseMetaData.getColumns(). > 2) Why does it not work to issue a query like INSERT INTO When you've explicitly supplied a value (NULL in this case) the default is not used. Otherwise there would be no way to set a column to NULL that had a default value. Kris Jurka ---------------------------(end of broadcast)---------------------------TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq Received on Fri Nov 30 06:02:16 2007 This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:40:41 EDT |
||||||||||
|
|||||||||||