pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #8389: JDBC Driver assumes first column to be an integer 2+ messages / 2 participants [nested] [flat]
* BUG #8389: JDBC Driver assumes first column to be an integer @ 2013-08-20 00:50 ivan.pli@solidit.cl 0 siblings, 1 reply; 2+ messages in thread From: ivan.pli@solidit.cl @ 2013-08-20 00:50 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 8389 Logged by: Ivan Pliouchtchai Email address: ivan.pli@solidit.cl PostgreSQL version: 9.2.4 Operating system: Windows 7 Description: PRECONDITION: When having a table with the next columns: content varchar(10) idcontent int primary key ACTION: Persisting a row using the JDBC driver (I used JBoss and hibernate to persist a bean) RESULT: The JDBC driver throws an exception while trying to parse the first column content (a string) as an integer. Anyway the content gets saved to the database. TEMPORARY SOLUTION: Recreating the table with the integer key column as the first column solved the problem. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #8389: JDBC Driver assumes first column to be an integer @ 2013-08-20 19:02 Kevin Grittner <kgrittn@ymail.com> parent: ivan.pli@solidit.cl 0 siblings, 0 replies; 2+ messages in thread From: Kevin Grittner @ 2013-08-20 19:02 UTC (permalink / raw) To: ivan.pli@solidit.cl <ivan.pli@solidit.cl>; pgsql-bugs "ivan.pli@solidit.cl" <ivan.pli@solidit.cl> wrote: > When having a table with the next columns: > content varchar(10) > idcontent int primary key > Persisting a row using the JDBC driver (I used JBoss and > hibernate to persist a bean) > The JDBC driver throws an exception while trying to parse the > first column content (a string) as an integer. I think the behavior you are seeing is due to JBoss or Hibernate. I've used many tables with no integer columns through PostgreSQL JDBC. Hibernate, by default, seems to want every table to have a primary key of a single integer column, it but can be coerced to work with a properly normalized relational database with a little effort. In my experience it's worth the effort. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-08-20 19:02 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2013-08-20 00:50 BUG #8389: JDBC Driver assumes first column to be an integer ivan.pli@solidit.cl 2013-08-20 19:02 ` Kevin Grittner <kgrittn@ymail.com>
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