Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Wanner <markus(at)bluegap(dot)ch>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: Proposal: move column defaults into pg_attribute along with attacl
Date: 2008-09-23 12:29:56
Message-ID: 25417.1222172996@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Markus Wanner <markus(at)bluegap(dot)ch> writes:
> Just to understand the issue here: what's the reason for having an OID 
> for the default value and possible another one for a ACLs, but none for 
> the attribute itself?

Well, as far as the dependency system goes this way is more convenient.
If pg_attribute entries had their own OIDs it would be fairly hard
to implement DROP TABLE except with an intermediate step of dropping
each of the columns one by one, because you'd pretty much have to have
explicit pg_depend entries linking each column to its table, and that
behavior is what you'd get from the dependency traversal.

So that's why we didn't add OIDs (back) to pg_attribute when we invented
the dependency system.

Default values would need their own OIDs, or at least some distinct
representation in pg_depend, in any case.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-09-23 12:38:26
Subject: Re: WIP patch: Collation support
Previous:From: Zdenek KotalaDate: 2008-09-23 12:26:58
Subject: Re: Initial prefetch performance testing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group