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

Re: [COMMITTERS] pgsql: Disallow changing/dropping default

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dhanaraj(dot)M(at)Sun(dot)COM
Subject: Re: [COMMITTERS] pgsql: Disallow changing/dropping default
Date: 2006-06-27 18:34:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> Wasn't this patch rejected?
> > Anyway, what is your opinion on this?
> I thought we'd rejected it.  I'm not sure that we'd completely agreed
> what the best thing to do is, but what this patch actually does is to
> silently remove the dependency link.  That is, after
> 	create table t1 (f1 serial);
> 	alter table t1 alter column f1 drop default;
> t1_f1_seq is still there, but now completely unconnected to t1.
> That doesn't seem to me to satisfy the principle of least surprise.
> It's certainly not what the TODO item says (reject the DROP DEFAULT).
> I think we were considering the alternative of having the DROP DEFAULT
> remove the sequence, which probably could be implemented painlessly
> with a change in the way we set up the dependency links to start with.
> In any case I don't like this patch: int/bool confusion, use of elog
> instead of ereport for a user-facing error message, failure to adhere to
> style guidelines for that message, etc.  (Although seeing that the error
> message is unreachable code, maybe that doesn't matter ;-))  Aside from
> the poor coding style, the whole idea of reaching into pg_depend to
> remove a single dependency strikes me as a brute-force solution to
> a problem that should have a more elegant answer.

Agreed, patch reverted.  Thanks for the analysis.

  Bruce Momjian   bruce(at)momjian(dot)us

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-06-27 18:37:32
Subject: Re: vacuum, performance, and MVCC
Previous:From: Greg StarkDate: 2006-06-27 18:28:43
Subject: Re: vacuum, performance, and MVCC

pgsql-committers by date

Next:From: Bruce MomjianDate: 2006-06-27 18:35:05
Subject: pgsql: Revert patch, doesn't do what it should: * %Disallow changing
Previous:From: Tom LaneDate: 2006-06-27 16:53:02
Subject: pgsql: Extend the MinimalTuple concept to tuplesort.c, thereby reducing

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