Re: Setting a pre-existing index as a primary key - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Setting a pre-existing index as a primary key
Date
Msg-id 48287D86.8030908@dunslane.net
Whole thread Raw
In response to Re: Setting a pre-existing index as a primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> BTW, aside from selecting the index the command would have to verify
> that the indexed columns are all NOT NULL.  We could either have it
> just throw an error if they aren't, or have it silently try to do
> an ALTER SET NOT NULL, which would require a table scan.
>
> I'm going to argue for the "just throw an error" choice.  I don't like
> the idea of a utility command that takes exclusive lock and then is
> either near-instantaneous or slow depending on factors not immediately
> obvious.
>
>             
>   

+1

cheers

andrew


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Proposal: Integrity check
Next
From: "Kevin Grittner"
Date:
Subject: Re: Syntax decisions for pl/pgsql RAISE extension