Spent some more time with getting postgresql to work with the tdk and
the example app, and got it working.

First it requires a patch to the postgresql jdbc driver, which I've
submitted to the author...just a couple of line change to
Statement.getResultSet() so that it returns a null when the result
is an update count instead of a result set.

Secondly, the postgresql db configuration needs a quick fix in the turbine
repository:

Index: conf/database/postgres
===================================================================
RCS file: /products/cvs/turbine/turbine/conf/database/postgres,v
retrieving revision 1.1
diff -r1.1 postgres
1c1
< database.driver=postgresql.Driver
---
> database.driver=org.postgresql.Driver

This file also should be renamed postgresql instead of postgres.


Lastly, there's a change I made which seems to be a sort of kludge to me,
but I did it to get things working.  When doing the build-project.sh init,
when inserting the tables, etc, torque generates a drop sequence or drop
table first, before creating...on the other db's, such as mysql, there's
a syntax for checking if the table exists (...IF EXIST...), but postgresql
doesn't support this, and I can find no equivalent.  So when SQLExec goes
to drop, it generates an error, and ant bails out.

What I did to get around this is add an 'onError=continue' to the <sql>
in build-project.xml.  This seems nasty to me, as you'd like to quit
when you run into other errors.  I'm far from a postgresql expert, so 
maybe someone else has a better idea on a cleaner solution?

Until then, the demo seems to be running fine, so I guess it's time to
actually use this stuff...

Thanks
John



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to