Re: Proposal: move column defaults into pg_attribute along with attacl - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: move column defaults into pg_attribute along with attacl
Date
Msg-id 22683.1222049691@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: move column defaults into pg_attribute along with attacl  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Proposal: move column defaults into pg_attribute along with attacl  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> Honestly, I really disliked the code which assumed pg_attribute had no
> NULLable/toastable columns and used what seemed like pretty gruesome
> hacks to create pg_attribute structures.

Agreed, but that seems orthogonal to the point here, which is that a
column's default expression is a distinct object for dependency purposes
and so it needs its own ID.  An OID in the pg_attrdef catalog works
nicely for that; the alternatives I've thought of seem like kluges.

> If we were to accept the pg_attrdef approach, why aren't we
> doing a pg_attracl table instead of adding a column to pg_attribute?

That's actually not an unreasonable question.  If you were to do that
then you could attach OIDs to the attribute ACLs, which might be a nicer
representation in pg_shdepend than you were thinking of using.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Proposal: move column defaults into pg_attribute along with attacl
Next
From: Joe Conway
Date:
Subject: Re: [patch] fix dblink security hole