Re: BUG #4412: Check constraints cannot be added to the table for fields that are mixed case - Mailing list pgsql-bugs

From Jaime Casanova
Subject Re: BUG #4412: Check constraints cannot be added to the table for fields that are mixed case
Date
Msg-id 3073cc9b0809091326w5bf75de2r6b936fb1108cc62d@mail.gmail.com
Whole thread Raw
In response to BUG #4412: Check constraints cannot be added to the table for fields that are mixed case  ("Kevin" <kevin@rtvision.com>)
List pgsql-bugs
On Tue, Sep 9, 2008 at 3:11 PM, Kevin <kevin@rtvision.com> wrote:

> Description:        Check constraints cannot be added to the table for
> fields that are mixed case
> Details:
>
> Check constraints cannot be added to the table for fields that are mixed
> case.
>
> Example - field employeeName in table Employees

postgres converts all your uppercase in object names to lowercase...
if you really want mixed case you must put the name in quotes.
Try with:

ALTER TABLE "Employees" ADD CONSTRAINT employeenametest
CHECK (employeename !=3D 'Kevin')


--=20
regards,
Jaime Casanova
Soporte y capacitaci=F3n de PostgreSQL
Asesor=EDa y desarrollo de sistemas
Guayaquil - Ecuador
Cel. (593) 87171157

pgsql-bugs by date:

Previous
From: "Kevin"
Date:
Subject: BUG #4412: Check constraints cannot be added to the table for fields that are mixed case
Next
From: "David Jaquay"
Date:
Subject: BUG #4413: LEFT JOIN not working as expected