Re: altering a table to set serial function - Mailing list pgsql-general

From Pierre-Frédéric Caillaud
Subject Re: altering a table to set serial function
Date
Msg-id opsbuhe0kpcq72hf@musicbox
Whole thread Raw
In response to Re: altering a table to set serial function  ("Scott Marlowe" <smarlowe@qwest.net>)
List pgsql-general
> test=> alter table test add id int4 unique;
> NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index
> "test_id_key" for table "test"
> ALTER TABLE

    I'd add UNIQUE NOT NULL or PRIMARY KEY just in case some UPDATE tries to
modify the id field to NULL which would be a Very Bad Thing to do.

pgsql-general by date:

Previous
From: Pierre-Frédéric Caillaud
Date:
Subject: Re: altering a table to set serial function
Next
From: Pierre-Frédéric Caillaud
Date:
Subject: Re: Sql injection attacks