From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: BETWEEN Node & DROP COLUMN |
Date: | 2002-07-05 14:34:22 |
Message-ID: | 10896.1025879662@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> 1. I'm going to prevent people from dropping the last column in their table.
> I think this is the safest option. How do I check if there's any other non
> dropped columns in a table? Reference code anywhere?
You look through the Relation's tupledesc and make sure there's at least
one other non-dropped column.
> 2. What should I do about inheritance? I'm going to implement it, but are
> there issues? It will basically drop the column with the same name in all
> child tables. Is that correct behaviour?
Yes, if the 'inh' flag is set.
If 'inh' is not set, then the right thing would be to drop the parent's
column and mark all the *first level* children's columns as
not-inherited. How painful that would be depends on what representation
we choose for marking inherited columns, if any.
> 3. I am going to initially implement the patch to ignore the behaviour and
> do no dependency checking. I will assume that Rod's patch will handle that
> without much trouble.
Yeah, Rod was looking ahead to DROP COLUMN. I'm still working on his
patch (mostly the pg_constraint side) but should have it soon.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-05 14:38:06 | Re: Proposal: CREATE CONVERSION |
Previous Message | Marc G. Fournier | 2002-07-05 14:27:16 | Re: Should next release by 8.0 (Was: Re: [GENERAL] I am |