Markus Schiltknecht <[EMAIL PROTECTED]> writes:
> UNIQUE (t1, lower(t2)));
> I can easily create an index for my needs [1], why can I not add such a
> unique constraint? Thanks for clarification.
Because the SQL spec defines this syntax, and it only allows column
names there.
Extending th
Emanuele Rocca wrote:
you'll get a duplicate key error.
Thank you, that solves my problem.
Although it makes me wonder even more why I'm not allowed to define such
a constraint. Looks like all the necessary backend code is there.
Regards
Markus
---(end of broadcast
Hello Markus,
* Markus Schiltknecht <[EMAIL PROTECTED]>, [2006-10-05 11:16 +0200]:
> I've been trying to add a unique constraint on a row and a function
> result of a row. I.e.:
>
> CREATE TABLE test (
> id SERIAL PRIMARY KEY,
> t1 TEXT NOT NULL,
> t2 TEXT NOT NULL,
>
Hi,
I've been trying to add a unique constraint on a row and a function
result of a row. I.e.:
CREATE TABLE test (
id SERIAL PRIMARY KEY,
t1 TEXT NOT NULL,
t2 TEXT NOT NULL,
UNIQUE (t1, lower(t2)));
That fails with a syntax error (on 8.2beta1). While UNIQUE(t1,