Re: Dependences records and comments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Dependences records and comments
Date
Msg-id 3959.1554872244@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
=?utf-8?B?0JTQvNC40YLRgNC40Lkg0JLQvtGA0L7QvdC40L0=?= <carriingfate92@yandex.ru> writes:
> When we create/alter object we already add dependency row to pg_depend
> (or, pg_shdepend) table for object that is depends (e.g. trigger depends
> on table which it created). But when I add comment on table, no one
> dependency row is added. Why?

Comments aren't interesting for dependency purposes: nothing can depend
on a comment, nor does a comment depend on anything but its one owning
object, they aren't relevant for CASCADE/RESTRICT rules, etc.  So
tracking them in pg_depend would just bloat pg_depend for little gain.
It's simpler to have hard-wired logic to look for a comment and delete it
when any object is deleted.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: pg_dump is broken for partition tablespaces
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Block level parallel vacuum