--
-- database abstraction layer on system catalog for postgresql 7.4
--
-- If your database setup is using a default table prefix, add it
-- to the name of the view, e.g. 'prefix_drupal_system_catalog'.
--
-- DROP VIEW drupal_system_catalog;

CREATE VIEW drupal_system_catalog (
  dbname,
  tabname,
  colname,
  coltype,
  colnull,
  coldefault,
  colextra
) AS
SELECT
 table_catalog,
 table_name,
 column_name,
 data_type,
 is_nullable,
 column_default,
 ordinal_position
FROM information_schema.columns
WHERE table_schema NOT IN ('pg_catalog','information_schema')
;

