Bug with Timestamp for PostgreSQL.

There seems to be a bug in LiquiBase for PostgreSQL where all Timestamp types map to “timestamp with time zone”.


Is there a way around this without creating the whole table with sql (or doing “replace” in every )?


Seth



The XML:


       

            <column name=“t_with”    type=“TIMESTAMP WITH TIME ZONE”/>

           

            <column name=“t_js”      type=“java.sql.Timestamp”/>

            <column name=“t_”        type=“TIMESTAMP”/>

       



The resulting table:


-----------±-------------------------±----------

 t_with    | timestamp with time zone | 

 t_without | timestamp with time zone | 

 t_js      | timestamp with time zone | 

 t_        | timestamp with time zone | 



Here is what I did:

public class CustomPostgres83TypeConverter extends Postgres83TypeConverter
{
    @Override
    public int getPriority() {
        return super.getPriority()+1;
    }
   
    @Override
    public DateTimeType getDateTimeType() {
        return new DateTimeType(“TIMESTAMP WITHOUT TIME ZONE”);
    }
}

And then

TypeConverterFactory.getInstance().register(new CustomPostgres83TypeConverter());

This makes it always do it without time zone, which is what I wanted.