PostgreSQL 9.1
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
Page 1 of 1 |
[ 3 posts ] |
| Print view | Previous topic | Next topic |
| Author | Message |
|---|---|
|
Trooper ![]() Joined: Mon Dec 08, 2008 10:27 am Posts: 11 Location: Atlanta, GA |
Doing some testing with latest and greatest PostgreSQL.... Immediately ran into a data type issue with boolean columns. Appears Postgres no longer automatically casts integer zeros and ones into booleans when inserting into or updating boolean columns.
The designer choked on the problem with a fairly cryptic RPC error, but as I was testing a new database, I looked at the query log first and saw: column "deleted" is of type boolean but expression is of type integer You will need to rewrite or cast the expression. A google search brought me to http://archives.postgresql.org/pgsql-ge ... g01056.php, which shows how to re-establish the auto-cast. Specifically, as a privileged database user, execute: update pg_cast set castcontext = 'a' where castsource = 'int'::regtype and casttarget = 'bool'::regtype; Hope this helps someone. |
| Sat Apr 07, 2012 10:30 am |
|
|
Trooper ![]() Joined: Mon Dec 08, 2008 10:27 am Posts: 11 Location: Atlanta, GA |
Hmmm. This fix doesn't survive DB restart.
|
| Sat Apr 07, 2012 11:52 am |
|
|
Trooper ![]() Joined: Mon Dec 08, 2008 10:27 am Posts: 11 Location: Atlanta, GA |
I downgraded the PostgreSQL JDBC driver from postgresql-9.1-901.jdbc4.jar to postgresql-9.1-901.jdbc3.jar.
Problem seems to be gone. FWIW, this is on Gentoo Linux 64bit w/ Ignition 7.4.1 & Sun JDK 1.6.0.31 |
| Sat Apr 07, 2012 1:31 pm |
|
|
|
Page 1 of 1 |
[ 3 posts ] |
|
|
All times are UTC - 8 hours |
Who is online |
Users browsing this forum: No registered users and 1 guest |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum |
