Re: pg_catalog tables don't have constraints?

From: Neil Anderson <neil(at)postgrescompare(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_catalog tables don't have constraints?
Date: 2017-06-08 11:59:31
Message-ID: CAEKCySu46PWBkCTvxTFAVnXeKGjsttVEvYf=UXegkfuigRWgJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> The bigger picture here is that catalog changes are supposed to be
> executed by C code in response to DDL commands, and it's the C code
> that is charged with maintaining catalog consistency. Constraints
> would be useful if we supported updating the catalogs with direct
> SQL manipulations; but we don't really. You can do that, if you're
> a superuser who's willing to take risks, but our policy is that if
> you break the catalogs that way you get to keep both pieces.

Ah! That makes sense. Constraints are there to help you when inserting
rows and when it comes to the catalogs you shouldn't be doing that
directly. I think for the diagram I'll add the links manually with the
caveat that they are not constraints, just edges in a graph.

Thanks for the details Tom!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-06-08 13:33:09 Re: Redo the filenode link in tablespace
Previous Message Karsten Hilbert 2017-06-08 11:43:06 Re: Redo the filenode link in tablespace