nconway@klamath.dyndns.org wrote:
----------------->>>>
If data for an attribute is missing, it will be set to NULL in 7.2 and
earlier versions of PostgreSQL. This behavior will be fixed in 7.3, but
until then, you can set the "id" column yourself:
COPY ...;
UPDATE mss SET id = nextval('mss_id_seq');
----------------->>>>
Wow, thanks that helps a lot. Maybe you can help shed some light. How do
you add a column and make it not null? I want to add a column the is:
NOT NULL DEFAULT nextval('mss_id_seq'::text)
Tried the following:
ALTER TABLE mss ADD COLUMN id int4 NOT NULL;
ALTER TABLE mss ALTER COLUMN id SET DEFAULT nextval('mss_id_seq'::text);
But it doesn't set the column modifier to NOT NULL. Why?