Reverse engineered Column definition incorrect for DEFAULT - Mailing list pgadmin-support

From Donald Fraser
Subject Reverse engineered Column definition incorrect for DEFAULT
Date
Msg-id 011701c388f6$f2226aa0$1664a8c0@DEMOLITION
Whole thread Raw
Responses Re: Reverse engineered Column definition incorrect
List pgadmin-support
The reverse engineered code for column definitions if incorrect for DEFAULT values.
I create table such as:
 
REATE TABLE public.tbl_bkgndata
(
  id int4 NOT NULL DEFAULT nextval('tbl_bkgndata_id_seq'::text),
) WITHOUT OIDS;
 
Reverse engineered column definition is:
 
ALTER TABLE public.tbl_bkgndata ADD COLUMN id int4;
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET STORAGE PLAIN;
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET NOT NULL;
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id DEFAULT nextval('tbl_bkgndata_id_seq'::text);
 
Last row should read:
ALTER TABLE public.tbl_bkgndata ALTER COLUMN id SET DEFAULT nextval('tbl_bkgndata_id_seq'::text);
 
That is the key word SET is missing.
 
Regards
Donald Fraser.

pgadmin-support by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: bit length not correct in pgAdmin III 1.0
Next
From: "Hiroshi Saito"
Date:
Subject: Re: Reverse engineered Column definition incorrect for DEFAULT