From: Andreas <maps.on@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Joshua Tolley <eggyknap@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Howto have a unique restraint on UPPER (textfield)
Date: Mon, 01 Feb 2010 05:27:40 +0100
Message-ID: <4B66583C.1050708@gmx.net> (raw)
In-Reply-To: <16294.1264972066@sss.pgh.pa.us>
References: <4B64EA46.60605@gmx.net>
<4b64f184.9613f30a.5d13.01b2@mx.google.com>
<4B65EC9C.6000606@gmx.net>
<16294.1264972066@sss.pgh.pa.us>
Tom Lane schrieb:
> Andreas <maps.on@gmx.net> writes:
>
>> So I had the missconception that UNIQUE (...) within CREATE TABLE (...)
>> was actually just an shorter way to define a unique index which it is not.
>>
>
> 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? The parser could just
take everything in the ( ) and use it as is.
Somehow there must be a notice in the meta data to mark the difference.
pgAdmin shows a unique as constraint but no index when created within
"create table".
The unique-index only shows up when created seperately.
regards
Andreas
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: maps.on@gmx.net, tgl@sss.pgh.pa.us, eggyknap@gmail.com
Subject: Re: Howto have a unique restraint on UPPER (textfield)
In-Reply-To: <4B66583C.1050708@gmx.net>
* 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