Re: Adding a column with constraint - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Adding a column with constraint
Date
Msg-id 20110224185008.GP74938@shinkuro.com
Whole thread Raw
In response to Adding a column with constraint  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
On Thu, Feb 24, 2011 at 07:30:32PM +0100, Alexander Farber wrote:
> Shouldn't the line
>
>     "pref_match_check" CHECK (completed >= win AND win >= 0)
>
> above actually be:
>
>     "pref_match_win_check" CHECK (completed >= win AND win >= 0)
>
> ? Does it indicate something went wrong or is it just cosmetic issue?

That's its name.  It could be "fredsredwagon".  If you want it to have
a specific name, then name it when you create the constraint.  This is
a little hard to understand from the manual, because of all the square
brackets and such, but I encourage you to experiment with the manual
open to see exactly what everything does.

I haven't checked just this instant, but I think you can rename the
constraint if you don't like its name.

A

--
Andrew Sullivan
ajs@crankycanuck.ca

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: regexp problem
Next
From: "David Johnston"
Date:
Subject: Re: Adding a column with constraint