pg_catalog tables don't have constraints?

From: Neil Anderson <neil(at)postgrescompare(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: pg_catalog tables don't have constraints?
Date: 2017-06-08 03:43:20
Message-ID: CAEKCySvWnoMKMxeyHkWtwcbg7Voopq4fswOh5DhfF-RAvznpHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I've been exploring the pg_catalog tables and pointed a couple of
tools at it to extract an ER diagram for a blog post. At first I
thought it was a bug in the drawing tool but it appears that the
relationships between the pg_catalog tables are implicit rather than
enforced by the database, is that correct?

For example, pg_class has relnamespace which according to the
documentation refers to pg_namespace.oid
(https://www.postgresql.org/docs/current/static/catalog-pg-class.html)
yet there is no FK there as far as I can see. Maybe I am missing
something or there is an interesting story as to why?

Thanks,
Neil

--
Neil Anderson
neil(at)postgrescompare(dot)com
https://www.postgrescompare.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-06-08 04:07:45 Re: pg_catalog tables don't have constraints?
Previous Message tel medola 2017-06-08 01:05:29 Re: Redo the filenode link in tablespace