I am getting the following error during reverse engineering in TDM v. 3.1.7.36:
Source:CS3- Internal error
Script: REDataMiratorDBPG82
Description: Error: Column c.reloptions does not exist
It seems that user is connecting to database PostgreSQL 8.1 using the connection settings for PostgreSQL 8.2.
In the message, it is written that column "reloptions" does not exist (it should be in system table pg_class). This column does not exist in database PostgreSQL 8.1 but exists only in database PostgreSQL 8.2.
Here's a complete query that we use to ask database PostgreSQL 8.2 for information on tables:
'SELECT n.nspname as "tableschema",c.relname as "tablename",ro.rolname as "tableowner",c.relhasoids,ts.spcname as "tablespace", c.reloptions[1] as "str_fillfactor"
FROM pg_catalog.pg_class c
JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
JOIN pg_catalog.pg_roles ro ON ro.oid = c.relowner
LEFT JOIN pg_catalog.pg_tablespace ts ON ts.oid = c.reltablespace
WHERE c.relkind = 'r' AND
n.nspname NOT IN ('information_schema', 'pg_catalog', 'pg_toast', 'pg_temp_1', 'pg_temp_2')
ORDER BY 1,2,3
This SQL query should work only in database PostgreSQL 8.2. It will not work in PostgreSQL 8.1 (it will not work in this db right because of the query on column c.reloptions).