Re: [HACKERS] alter table

From: Ryan Bradetich <rbrad(at)hpb50023(dot)boi(dot)hp(dot)com>
To: vev(at)michvhf(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] alter table
Date: 1999-07-06 22:11:53
Message-ID: 199907062211.QAA06825@hpb50023.boi.hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Vince Vielhaber <vev(at)michvhf(dot)com> writes:
> > Can a serial type be added to an existing table using ALTER TABLE? If so
> > why doesn't it work on hub? If not, I guess that explains why it doesn't
> > work, so I'm open to suggestions on how to add it easily...
>
> I'm not sure about this, but I seem to recall that ALTER TABLE ADD
> COLUMN doesn't know anything about adding constraints or defaults.
> And, of course, the default clause for a serial column is what *really*
> makes it go. Given this lack, the fact that ALTER TABLE is also
> unprepared to create the underlying sequence object for a SERIAL column
> is the least of your worries ;-)
>
> There was some discussion a few months ago about redesigning the support
> for SERIAL columns to make them less of an add-on kluge and more of a
> real integrated feature. I'd be inclined to think that that should
> happen before we try to teach ALTER TABLE about serial columns ---
> otherwise it'll just be another kluge in need of replacement. Does
> anyone recall what happened with that discussion thread?
>
> regards, tom lane

Yes, I was the one who wanted to redo SERIAL support as a type instead of a
sequence and index. I hope to begin working on that later this week, or
sometime next week. (Work has kept me busy lately :()

-Ryan

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 1999-07-06 22:24:57 Re: [HACKERS] Fwd: Joins and links
Previous Message Bruce Momjian 1999-07-06 21:59:25 Updated FAQ