X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F14postgres-parser.t;h=fd60cb0b3b323d7291df05e0342bf2294f5e117d;hb=aee4b66eb2152b7066ced4def46e0223eb1649b1;hp=96390bfffdb3eee109d1175acd9065de4fd52059;hpb=c96cd4a82bc9447c278ecf2416a7f8fb052853a7;p=dbsrgits%2FSQL-Translator.git diff --git a/t/14postgres-parser.t b/t/14postgres-parser.t index 96390bf..fd60cb0 100644 --- a/t/14postgres-parser.t +++ b/t/14postgres-parser.t @@ -21,10 +21,10 @@ my $sql = q{ f_varchar character varying (255), f_double double precision, f_bigint bigint not null, - f_char character(10) default 'FOO', + f_char character(10) default 'FOO'::character(10), f_bool boolean, f_bin bytea, - f_tz timestamp, + f_tz timestamp default '1970-01-01 00:00:00'::TIMESTAMP, f_text text, f_fk1 integer not null references t_test2 (f_id), f_dropped text, @@ -79,7 +79,7 @@ my $sql = q{ alter table t_test1 alter column f_char drop default; - -- The following are allowed by the grammar + -- The following are allowed by the grammar -- but won\'t do anything... - ky alter table t_text1 alter column f_char set not null; @@ -182,7 +182,7 @@ is( $f8->name, 'f_tz', 'Eighth field is "f_tz"' ); is( $f8->data_type, 'timestamp', 'Field is a timestamp' ); is( $f8->is_nullable, 1, 'Field can be null' ); is( $f8->size, 0, 'Size is "0"' ); -is( $f8->default_value, undef, 'Default value is undefined' ); +is( $f8->default_value, '1970-01-01 00:00:00', 'Default value is 1970-01-01 00:00:00' ); is( $f8->is_primary_key, 0, 'Field is not PK' ); my $f9 = shift @t1_fields;