Re: Proposal: move column defaults into pg_attribute along with attacl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: move column defaults into pg_attribute along with attacl
Date: 2008-09-22 02:14:51
Message-ID: 22683.1222049691@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2008-09-22 02:26:26 Re: [patch] fix dblink security hole
Previous Message Stephen Frost 2008-09-22 02:07:27 Re: Proposal: move column defaults into pg_attribute along with attacl