postgresql generate ddl returns FK with `<?>()` in it

From: Roman Gavrilov <roman(dot)gavrilov(at)projectcanary(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: postgresql generate ddl returns FK with `<?>()` in it
Date: 2022-07-07 13:05:53
Message-ID: CA+FPCaUO=j5bkSLpAOgs8bvt1Jvs=tTwxxmjSM+gis5PNgK=zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:

https://stackoverflow.com/questions/72898296/what-is-in-postgresql-ddl

Regards,
Roman

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-07-07 13:52:26 Re: About revoking large number of privileges; And the PUBLIC role.
Previous Message Dominique Devienne 2022-07-07 07:47:38 About revoking large number of privileges; And the PUBLIC role.