Skip Menu |

This queue is for tickets about the DBIx-DBSchema CPAN distribution.

Report information
The Basics
Id: 82320
Status: open
Priority: 0/
Queue: DBIx-DBSchema

People
Owner: Nobody in particular
Requestors: Xavier (no email address)
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.21
Fixed in: (no value)



Subject: Unable to query columns in views (Pg-DB)
Transcription of http://bugs.debian.org/179011 Package: libdbix-dbschema-perl Version: 0.21-1 Severity: important 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
Show quoted text
> The following code is not running for view ($table_name is a view only > for tables) with the postgres DB.
DBIx::DBSchema / DBIx::DBScheam::DBD::Pg currently models tables, not views. Patches implementing view support are welcome. I wrote the table support by reverse-engineering the queries generated by "psql -e" with \d commands; the same could probably be done with views.