[daisy] [JIRA] Updated: (DSY-516) [PATCH] Fix PostgreSQL compatibility

Andreas Deininger (JIRA) issues at cocoondev.org
Thu Aug 2 08:48:50 CDT 2007


     [ http://issues.cocoondev.org//browse/DSY-516?page=all ]

Andreas Deininger updated DSY-516:
----------------------------------

    Attachment: postgresql-4.diff

This patch postgresql-4.diff is sa further step towards PostgreSQL compatibility:

The patch implements the switch to  JDBC driver 8.x, since jdbc escaped functions can be used with this version only.
In order to work allow the correct intialisation of the daisy and the wiki, the following changes have to be made (these errors ocur with  JDBC driver 8.x only):

* PostgresqlDatabaseSpecifics.java: remove premature closing of a statement
* checkDatabaseIsEmpty (which checks for tables in database): provide String[] objectCategories to the metada conn.getMetaData().getTables(null, null, null, null) call. Otherwise, system tables will be listed also, pretending the database to be not empty
* Adding protocolVersion=2 to jdbc:postgresql://localhost in order to prevent parameter typing which breaks things
* fix a typo in exception error message in JdbcHelper

> [PATCH] Fix PostgreSQL compatibility
> ------------------------------------
>
>          Key: DSY-516
>          URL: http://issues.cocoondev.org//browse/DSY-516
>      Project: Daisy
>         Type: Improvement
>   Components: Repository - database support
>     Versions: 2.1
>  Environment: Latest SVN
>     Reporter: Andreas Deininger
>     Priority: Minor
>  Attachments: postgresql-2.diff, postgresql-3.diff, postgresql-4.diff, postgresql.diff
>
> The uploaded patch fixes the broken PostgreSQL compatibility of daisy
> * renamed field name_ in table wf_pools to name_pool since it conflicts with name_ in table daisy_namespaces
> * minor changes to query/model/SqlGenerationContext.java in order to make SQL statements work with PostgreSQL
> * workflow/serverimpl/LocalWfPoolStrategy.java: adding users to workflow pool: PostgreSQL does not know INSERT IGNORE, so insert some logic to perform either an INSERT or an UPDATE, depending whether user record exists or not
> * upgrading to latest postgreSQL JDBC driver: postgresql-7.4-216.jdbc3.jar (jdbc drivers for postgresql 8.x do not seem to work)
> Also a small fix to <daisy-src>/README.txt is included

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list