postgresql generate ddl returns FK with `()` in it - Mailing list pgsql-general

From Roman Gavrilov
Subject postgresql generate ddl returns FK with `()` in it
Date
Msg-id CA+FPCaUO=j5bkSLpAOgs8bvt1Jvs=tTwxxmjSM+gis5PNgK=zg@mail.gmail.com
Whole thread Raw
Responses Re: postgresql generate ddl returns FK with `()` in it  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Re: postgresql generate ddl returns FK with `()` in it  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
I have a schema with two tables, where the first table's composite 2-columns FK points to the second table's 2-columns composite PK. But the order of columns is reversed.

When I use `Generate DDL` on the first table, FK definition comes back as:

ALTER TABLE eval.rubric_questions ADD CONSTRAINT rubric_questions_fk FOREIGN KEY (rubric_id,rubric_version_id) REFERENCES <?>();

How can I fix that `<?>();` issue? Is this documented behavior?

(I realize that I need to fix the schema, but in time-being I need to generate code using entity framework, and it chokes in that).

Full details on SO:


Regards,
Roman

pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: About revoking large number of privileges; And the PUBLIC role.
Next
From: Tom Lane
Date:
Subject: Re: About revoking large number of privileges; And the PUBLIC role.