git.postgresql.org Git - postgresql.git/commit
Wed, 5 May 2004 04:48:48 +0000 (04:48 +0000)
Wed, 5 May 2004 04:48:48 +0000 (04:48 +0000)
commit 077db40fa1f3ef93a60d995cc5b2666474f81302
ALTER TABLE rewrite. New cool stuff:
* ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL
spec. A default is implemented by rewriting the table with the new value
stored in each row.
* ALTER COLUMN TYPE. You can change a column's datatype to anything you
want, so long as you can specify how to convert the old value. Rewrites
the table. (Possible future improvement: optimize no-op conversions such
as varchar(N) to varchar(N+1).)
* Multiple ALTER actions in a single ALTER TABLE command. You can perform
any number of column additions, type changes, and constraint additions with
only one pass over the table contents.
Basic documentation provided in ALTER TABLE ref page, but some more docs
work is needed.
Original patch from Rod Taylor, additional work from Tom Lane.
30 files changed:
This is the main PostgreSQL git repository.
RSS
Atom