Good afternoon. I am the Chief Architect, with 19 years of experience in the software industry, for an enterprise software product. I am requesting your help to better understand or resolve the following issue.
Our architecture is based on Spring and Hibernate. The product is required to support multiple databases (RDBMS neutral). Our product extensively utilizes "boolean" fields. In the database (DDL), we store these boolean fields into SmallInt, ANSI SQL data type for maximum portability. Hibernate maps these Java boolean types to DB SmallInt fields. Now comes the "religious" discussion. The above design works well for Oracle, DB2 and MySQL, etc. But PostgresQL seems to choke. It complains about the data type mismatch. By reading various discussions on your forum, there seems to some issues with the data type mapping at the JDBC driver. JDBC driver does not convert boolean value (false/true) to integers (0/1). I understand you have your own reasons for this but this is a real architectural scenario anyone should expect at this age of RDBMS. I am new to PostgresQL but I also heard great things about PostgresQL. Your recent improvements towards High Availability (HA) especially Streaming Replication seems to be an impression direction. But it amazes me why such simple/flexible feature was not supported yet. I would greatly appreciate your insights. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Mapping-Hibernate-boolean-to-smallint-Postgresql-tp2853280p2853280.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs