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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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