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

Re: small bug in ADD CONSTRAINT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: small bug in ADD CONSTRAINT
Date: 2004-03-13 20:05:56
Message-ID: 1485.1079208356@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> This works:
>   ALTER TABLE segment ADD CONSTRAINT  name  unique(textfield, reseller);

> This doesn't:
>   ALTER TABLE segment ADD CONSTRAINT  name  unique(lower(textfield), 
> reseller);

I don't think this is a bug.  The unique-constraint syntax is defined by
the SQL spec and it only allows simple column names.  If we extended it
as you suggest, we would break code that expects constraints to apply to
columns (there is some in the backend as well as in clients).

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Stephan SzaboDate: 2004-03-13 20:16:49
Subject: Re: small bug in ADD CONSTRAINT
Previous:From: Alex J. AvrietteDate: 2004-03-12 20:13:19
Subject: Re: Function is called multiple times in subselect

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