Subject: | Doesn't work anymore on PostgreSQL 8.3 |
One of the last updates seems to have dropped compatibility to PostgreSQL 8.3.
Specifically _table_fk_info doesn't work anymore:
DBIx::Class::Schema::Loader::DBI::Pg::_table_fk_info(): DBI Exception: DBD::Pg::st execute failed: ERROR: syntax error at or near "from_col"
LINE 1: ..._name, q.to_schema, q.to_table, from_cols.attname from_col, ...
^ [for Statement "select q.constr_name, q.to_schema, q.to_table, from_cols.attname from_col, to_cols.attname to_col,
q.on_delete, q.on_update, q.is_deferrable
from (select constr.conname constr_name, to_ns.nspname to_schema, to_class.relname to_table,
unnest(constr.conkey) from_colnum, unnest(constr.confkey) to_colnum,
constr.confdeltype on_delete, constr.confupdtype on_update,
constr.condeferrable is_deferrable,
constr.conrelid conrelid, constr.confrelid confrelid
from pg_constraint constr
join pg_namespace from_ns on constr.connamespace = from_ns.oid
join pg_class from_class on constr.conrelid = from_class.oid and from_class.relnamespace = from_ns.oid
join pg_class to_class on constr.confrelid = to_class.oid
join pg_namespace to_ns on to_class.relnamespace = to_ns.oid
where from_ns.nspname = ?
and from_class.relname = ?
and from_class.relkind = 'r'
and constr.contype = 'f'
) q
join pg_attribute from_cols on from_cols.attrelid = q.conrelid and from_cols.attnum = q.from_colnum
join pg_attribute to_cols on to_cols.attrelid = q.confrelid and to_cols.attnum = q.to_colnum;
Once I fix it to use "AS" it complains about missing unnest(). Could it made to work again for PostgreSQL 8.3? Otherwise maybe you could at least document the requirement in DBIx::Class::Schema::Loader::DBI::Pg.
Thanks,
Frank