On 4/13/06, Jason <[EMAIL PROTECTED]> wrote: > ok so now its encoding ok, but there is a more fundamental issue. > > 'text' field types are being stored as varchar in the xml def, but its not > remapping it back to a 'text' type when it goes to recreate the tables - > so it breaks, badly.
DdlUtils does not check the length of the VARCHAR columns. So, if you specify VARCHAR with a size of 2147483647 in the XML then you will get a VARCHAR in the generated SQL. Did you create the XML manually, or was it read by DdlUtils from a live database ? If the latter, could you post the original table creation SQL (as reported e.g. by pgAdmin or similar tools) ? > also I have noticed that it creates the database with just the LATIN > characterset, but the source db was UNICODE. Is there an undocumented > option to specify a character encoding for the database? should that be > stored with the schema/or even the data? You can specify the charset for the database when it is created. You use the parameter sub element (http://db.apache.org/ddlutils/ant-tasks.html#Subtask%3A+createDatabase) like this: <createDatabase> <parameter platforms="postgresql" name="ENCODING" value="'UTF8'"/> </createDatabase> (notice the single quotes around UNICODE within the double quotes of the value attribute). For a list of supported values see here: http://www.postgresql.org/docs/8.1/static/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED > The TIMESTAMP types are also not as they started. Could you explain that a bit more ? Tom
