Subject: | Producer::PostgreSQL handles size incorrectly |
SQL::Translator::Producer::PostgreSQL will always remove the size
attribute from the produced SQL code if size is 0. This isn't correct
behaviour, some column types such as timestamp accepts a size of 0
which in that particular case specifies how many fractional digits to
include.
The culprit is the following piece of code:
if ( defined $size[0] && $size[0] > 0 ) {
$field_def .= '(' . join( ',', @size ) . ')';
}
Removing the $size[0] > 0 part of the check seems to make everything
work as supposed to without any negative side-effects.