0

Is it possible to create a foreign key that relates to information_schema?

For an application implementation, I would like to store extra column information in another table, but I want to ensure that it is not describing columns that do not exist.

Is it possible to have a foreign key that relates to information_schema? If so, how?

0

Is it possible to have a foreign key that relates to information_schema

No.

information_schema contains views. You can't have a foreign key to a view.

You can't set a foreign key to point at the underlying pg_catalog.pg_attribute table that defines columns, either, because foreign keys to system catalogs are not supported.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy