Changeset 4964
- Timestamp:
- 11/02/09 06:21:40 (4 weeks ago)
- Files:
-
- 1 modified
-
branches/greyhound/lib/MT/ObjectDriver/DDL/Pg.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/greyhound/lib/MT/ObjectDriver/DDL/Pg.pm
r4196 r4964 108 108 return undef if $sth->err; 109 109 return undef unless %$attr; 110 111 my @key_column_names = $dbh->primary_key(undef, undef, $table_name); 112 my $key_columns = {}; 113 foreach ( @key_column_names ) { 114 $key_columns->{$_} = 1; 115 } 110 116 111 117 my $defs = {}; … … 127 133 } 128 134 if ( $col->{PRIMARY_KEY} ) { 135 $defs->{$colname}{key} = 1; 136 } elsif ( exists $key_columns->{$field_prefix.'_'.$colname} ) { 129 137 $defs->{$colname}{key} = 1; 130 138 }
