SQL adaptation guide for PostgreSQL 9.x / Data dictionary |
Both Informix® and PostgreSQL support primary key, unique, foreign key, default and check constraints, but the constraint naming syntax is different. PostgreSQL expects the "CONSTRAINT" keyword before the constraint specification and Informix expects it after.
Informix | PostgreSQL |
---|---|
CREATE TABLE emp ( ... emp_code CHAR(10) UNIQUE CONSTRAINT pk_emp, ... |
CREATE TABLE emp ( ... emp_code CHAR(10) CONSTRAINT pk_emp UNIQUE, ... |
The database interface does not convert constraint naming expressions when creating tables from BDL programs. Review the database creation scripts to adapt the constraint naming clauses for PostgreSQL.