Skip site navigation (1) Skip section navigation (2)

Re: BUG #4412: Check constraints cannot be added to the table for fields that are mixed case

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Kevin <kevin(at)rtvision(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4412: Check constraints cannot be added to the table for fields that are mixed case
Date: 2008-09-09 21:02:45
Message-ID: 20080909135921.P84089@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, 9 Sep 2008, Kevin wrote:

> The following bug has been logged online:
>
> Bug reference:      4412
> Logged by:          Kevin
> Email address:      kevin(at)rtvision(dot)com
> PostgreSQL version: 8.0.15
> Operating system:   Gentoo Linux
> 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
> ---------
> ALTER TABLE "Employees" ADD CONSTRAINT "employeeNameTest" CHECK
> (employeeName != 'Kevin')

I don't have 8.0 around to test, but I think that should be
("employeeName" != 'Kevin'). If you created the table with mixed-case
columns in double quotes or used a tool which double quoted them for you,
then you must double quote the column name when it's referenced, otherwise
the names are case-folded.

In response to

pgsql-bugs by date

Next:From: Jaime CasanovaDate: 2008-09-09 21:08:05
Subject: Re: BUG #4413: LEFT JOIN not working as expected
Previous:From: David JaquayDate: 2008-09-09 20:28:27
Subject: BUG #4413: LEFT JOIN not working as expected

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group