From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas <maps.on@gmx.net>
Cc: Joshua Tolley <eggyknap@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Howto have a unique restraint on UPPER (textfield)
Date: Sun, 31 Jan 2010 23:41:56 -0500
Message-ID: <29274.1264999316@sss.pgh.pa.us> (raw)
In-Reply-To: <4B66583C.1050708@gmx.net>
References: <4B64EA46.60605@gmx.net>
<4b64f184.9613f30a.5d13.01b2@mx.google.com>
<4B65EC9C.6000606@gmx.net>
<16294.1264972066@sss.pgh.pa.us>
<4B66583C.1050708@gmx.net>
Andreas <maps.on@gmx.net> writes:
> Tom Lane schrieb:
>> Well, it is that --- it just doesn't provide access to all the features
>> that CREATE INDEX does.
>>
> So as it is a shortcut for "create index" then why would the function
> call of upper not be accepted when the sql parser maps the
> uniqe-constraint into the "create index" command?
Because the UNIQUE constraint syntax is defined by the SQL standard,
and among other things the standard requires all UNIQUE constraints
to be represented in the information_schema. But the information_schema
views don't have the flexibility to represent anything but simple column
values in a unique constraint. So we just expose that in CREATE INDEX,
which is outside the standard anyway.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, maps.on@gmx.net, eggyknap@gmail.com
Subject: Re: Howto have a unique restraint on UPPER (textfield)
In-Reply-To: <29274.1264999316@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox