Re: Request: set opclass for generated unique and primary key indexes

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: sszabo(at)megazone(dot)bigpanda(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Request: set opclass for generated unique and primary key indexes
Date: 2006-02-23 06:21:34
Message-ID: BAY20-F105521FB4E6939825B1788F9F20@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>Right, but does the pattern_ops one have to be unique?
Sorry, I don't uderstand

>And if it does, do you need the normal unique constraint as well?
Sometime yes. It's about using natural or generated unique values.

I looked to source code and I propouse syntax:

CREATE TABLE name ..
colname type PRIMARY KEY | UNIQUE [USING INDEX [TABLESPACE ...] [OPERATOR
CLASS opclass]

CREATE CONSTRAINT name
PRIMARY KEY | UNIQUE '(' colname opt_class, ....

I don't think so this need big patch.
What do you think?

Regards, nice a day
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com.
http://www.msn.cz/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-02-23 11:10:39 Re: pg_config, pg_service.conf, postgresql.conf ....
Previous Message Qingqing Zhou 2006-02-23 05:36:04 Re: A doubt..