Tuesday, January 16, 2007

Problems with code generated by Dreamweaver 8.0.2 and Postgres

A cautionary tale about updating to Dreamweaver 8.0.2 if you use Postgres. Yesterday I decided to upgrade my copy of Dreamweaver 8 to 8.0.2 because it kept on telling me there was an update available. I didn't expect any problems and, if anything, hoped that the process would help resolve some of the problems I have encountered when using Postgres against Dreamweaver. While you can generate code for Postgres in Dreamweaver, it tended to complain about not understanding what a 'serial' or 'int4' datatype is. However, I found that once I had updated my Dreamweaver, I could no longer generate code to update records in my Postgres database. Instead I got an error like this:

ERROR: column "status_id" is of type 'integer' but expression is of type 'character varying'

We compared the code generated before and after the Dreamweaver upgrade and noticed that the code generated by the upgraded Dreamweaver was attempting to push data into the database as a literal (so the string in my page was being pushed as a String into my number field). While there could be another explanation for all of this, the process of deduction has pointed the finger at this new Dreamweaver upgrade (the pages I made in Dreamweaver pre-upgrade worked fine). If you NEED something provided in the new upgrade then you need to investigate this problem further, if not, then I highly recommend sticking to your pre-upgraded version of Dreamweaver 8.

1 comment:

Zilli said...

People should read this.