- Package:
- libdbix-dbschema-perl
- Source:
- libdbix-dbschema-perl
- Submitter:
- Robert Suna
- Date:
- 2012-12-29 18:21:05 UTC
- Severity:
- normal
The following code is not running for view ($table_name is a view only
for tables) with the postgres DB.
my $schema = new_native DBIx::DBSchema $DB_DATA_SOURCE, $DB_USER,
$DB_PASSWORD;
my $tab = $schema->table($table_name);
# create table header
my @header = @{$tab->{'column_order'}};
but it works wery well with
my $dbh = DBI->connect($DB_DATA_SOURCE, $DB_USER, $DB_PASSWORD);
my @cols = DBIx::DBSchema::DBD::Pg::columns(undef, $dbh, $table_name);
print "TABLE: ", ::Dumper(\@cols);
bye
Robert