Home » Database » DB » Bug #3595
Get list of views in PostgreSQL wrong
Details
| Request #3595 | Get list of views in PostgreSQL wrong |
|---|---|
| Submitted | 2005-02-25 15:01 UTC |
| From | gjm at uevora dot pt |
| Assigned | danielc |
| Status | Closed |
| Package | DB |
| PHP Version | 4.3.10 |
| OS | All |
| Roadmaps | (Not assigned) |
Comments
[2005-02-25 15:01 UTC] gjm at uevora dot pt
Description:
------------
The query to get the list of views in PostgreSQL only returns the views in the public schema. The query condition should ignore the system schemas instead of limiting to the public schema.
[2005-02-25 17:05 UTC] gjm at uevora dot pt
I'm using DB 1.7.0RC1 and PostgreSQL 7.4.7. I don't know exactly wich version of PostgreSQL introduced schemas, but i think it was 7.4.
Perhaps the code generation should be conditional. Is there a way of getting the backend version in DB? I'm sorry if this is a silly question but i'm starting to use PEAR::DB for the first time and haven't read the API completly.
The query should probably be:
SELECT viewname from pg_views
WHERE schemaname != 'information_schema'
AND schemaname != 'pg_catalog'
Thanks and keep up the good work!