Reduce $Id to its normal form
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser / DBI / PostgreSQL.pm
index 142b9b1..9ea5c95 100644 (file)
@@ -1,9 +1,9 @@
 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
@@ -40,7 +40,7 @@ use Data::Dumper;
 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;
 
 # -------------------------------------------------------------------
@@ -94,12 +94,12 @@ sub parse {
             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);