Re: UNIQUE constraints on function results - Mailing list pgsql-general

From Tom Lane
Subject Re: UNIQUE constraints on function results
Date
Msg-id 12425.1160055637@sss.pgh.pa.us
Whole thread Raw
In response to UNIQUE constraints on function results  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-general
Markus Schiltknecht <markus@bluegap.ch> 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 the spec in this particular direction is not as easy as it
might look, either.  What will you do with the information_schema
description of the unique constraint?

            regards, tom lane

pgsql-general by date:

Previous
From: Markus Schiltknecht
Date:
Subject: Re: UNIQUE constraints on function results
Next
From: "Peter Bauer"
Date:
Subject: Re: Major Performance decrease after some hours