Hi,
Another problem I had trying to get VIEWs to work with
PostgreSQL 7.2.1, DBI-1.21, and DBD-Pg-1.13 is that in
base.pl it is assumed that the DBI function tables() is
going to return both tables and views. But this is not
the case. With DBD-Pg-1.13, only tables are returned.
Have the DBI people clearly stated somewhere what the
correct behavior is? Tables or tables+views?
To fix this, it seems like dbengine should either have
database specific get_tables() function (which could
create a hash which also indicates if the table is
really a VIEW, so db_isView could be removed). This
get_tables function could use the newer table_info
function instead of the deprecated tables() function.
A quick fix for DBD-Pg is the following:
[p-hoover@iamac37 util]$ diff
/usr/lib/perl5/site_perl/5.6.0/ppc-linux/DBD/Pg.pm
/share/DBD-Pg/DBD-Pg-1.13/Pg.pm
190c190
< where relkind IN ('r','v')
---
> where relkind = 'r'
Is this really a DBD-Pg bug? Should it be submitted to
the DBD-Pg maintainer? Would it break other existing
client software?