Alter Table phase 1 -- Please apply to 7.5

Started by Rod Taylorover 22 years ago4 messagespatches
Jump to latest
#1Rod Taylor
rbt@rbt.ca

Completes:
ALTER TABLE ADD COLUMN does not honour DEFAULT and non-CHECK
CONSTRAINT

ALTER TABLE ADD COLUMN column DEFAULT should fill existing rows
with DEFAULT value

ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence
because of the item above

Previously described reorganization of all ALTER TABLE commands.

Most of the way through column type change. I need to supply a followup
patch which deals with logical attribute numbers.

ALTER TABLE table ALTER [COLUMN] column TYPE type USING expression;

Syntax documentation updates only. Content to come later.

Attachments:

altertable.patch.gzapplication/x-gzip; name=altertable.patch.gzDownload
#2Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#1)
Re: Alter Table phase 1 -- Please apply to 7.5

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Rod Taylor wrote:

Completes:
ALTER TABLE ADD COLUMN does not honour DEFAULT and non-CHECK
CONSTRAINT

ALTER TABLE ADD COLUMN column DEFAULT should fill existing rows
with DEFAULT value

ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence
because of the item above

Previously described reorganization of all ALTER TABLE commands.

Most of the way through column type change. I need to supply a followup
patch which deals with logical attribute numbers.

ALTER TABLE table ALTER [COLUMN] column TYPE type USING expression;

Syntax documentation updates only. Content to come later.

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#1)
Re: Alter Table phase 1 -- Please apply to 7.5

Rod Taylor wrote:

Completes:
ALTER TABLE ADD COLUMN does not honour DEFAULT and non-CHECK
CONSTRAINT

ALTER TABLE ADD COLUMN column DEFAULT should fill existing rows
with DEFAULT value

ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence
because of the item above

Previously described reorganization of all ALTER TABLE commands.

Most of the way through column type change. I need to supply a followup
patch which deals with logical attribute numbers.

ALTER TABLE table ALTER [COLUMN] column TYPE type USING expression;

Syntax documentation updates only. Content to come later.

Tom has looked over this patch and wants to make some adjustments before
applying so I will keep this in my queue and wait for him to complete
his changes and get it into CVS.

Thanks.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#1)
Re: Alter Table phase 1 -- Please apply to 7.5

Patch applied with adjustments by Tom. Thanks.

---------------------------------------------------------------------------

Rod Taylor wrote:

Completes:
ALTER TABLE ADD COLUMN does not honour DEFAULT and non-CHECK
CONSTRAINT

ALTER TABLE ADD COLUMN column DEFAULT should fill existing rows
with DEFAULT value

ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence
because of the item above

Previously described reorganization of all ALTER TABLE commands.

Most of the way through column type change. I need to supply a followup
patch which deals with logical attribute numbers.

ALTER TABLE table ALTER [COLUMN] column TYPE type USING expression;

Syntax documentation updates only. Content to come later.

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073