I've tried to install dba in a sandbox working with PostGreSQL 8.1. I used the query in dba.pgsql-7.4 to create the needed view drupal_system_catalog.

However, accessing any page of dba module leads to an error:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "cms_drupal_system_catalog" does not exist in includes\database.pgsql.inc on line 84

pgAdmin outputs the following SQL for this view:

-- View: "drupal_system_catalog"

-- DROP VIEW drupal_system_catalog;

CREATE OR REPLACE VIEW drupal_system_catalog AS 
 SELECT columns.table_catalog AS dbname, columns.table_name AS tabname, columns.column_name AS colname, columns.data_type AS coltype, columns.is_nullable AS colnull, columns.column_default AS coldefault, columns.ordinal_position AS colextra
   FROM information_schema.columns
  WHERE columns.table_schema::text <> 'pg_catalog'::text AND columns.table_schema::text <> 'information_schema'::text;

ALTER TABLE drupal_system_catalog OWNER TO test;
GRANT ALL ON TABLE drupal_system_catalog TO test;
GRANT ALL ON TABLE drupal_system_catalog TO public;

If I use show data directly in pgAdmin I'm getting an output of this view that looks ok.

CommentFileSizeAuthor
#1 dba.pgsql-7.4.prefix.patch637 bytessun

Comments

sun’s picture

Title: Non-existant relation error with PgSQL 8.1 » Add info about table prefixes on PostGreSQL
Component: PostgreSQL Support » Documentation
Category: bug » task
Status: Active » Needs review
StatusFileSize
new637 bytes

Found my mistake - forgot to add the default table prefix of my Drupal installation.
Maybe this info could be added to pgsql files?

dww’s picture

Status: Needs review » Fixed

good one, thanks. committed to HEAD, DRUPAL-4-7 and DRUPAL-4-6.

Anonymous’s picture

Status: Fixed » Closed (fixed)