package SQL::Translator::Parser::DBI::PostgreSQL;
# -------------------------------------------------------------------
-# $Id: PostgreSQL.pm,v 1.9 2005-10-07 16:26:41 scottcain Exp $
+# $Id$
# -------------------------------------------------------------------
-# Copyright (C) 2002-4 SQLFairy Authors
+# Copyright (C) 2002-2009 SQLFairy Authors
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
use SQL::Translator::Schema::Constants;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '1.99';
$DEBUG = 0 unless defined $DEBUG;
# -------------------------------------------------------------------
my $col = $table->add_field(
name => $$columnhash{'attname'},
default_value => $$columnhash{'adsrc'},
- data_type => $$columnhash{'typename'},
+ data_type => $$columnhash{'typname'},
order => $$columnhash{'attnum'},
) || die $table->error;
$col->{size} = [$$columnhash{'length'}] if $$columnhash{'length'}>0;
- $col->{is_nullable} = 1 unless $$columnhash{'attnotnull'};
+ $col->{is_nullable} = $$columnhash{'attnotnull'} ? 0 : 1;
}
$index_select->execute($table_oid);