multiple fields index

From: "enediel" <enediel(at)com(dot)ith(dot)tur(dot)cu>
To: "postgresql" <pgsql-general(at)postgresql(dot)org>
Subject: multiple fields index
Date: 2003-04-09 17:09:09
Message-ID: 014901c2feba$c2943460$2824a8c0@nsoft
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I need a database where all text information will be kept as the users wrote
it.

This purposes includes a problem to create unique indexes with multiples
fields, where text fields are part of the indexes.

Suppose for example a table INSTITUTIONS, and other table
CLIENTS_PER_INSTITUTION
I need to create a unique index (nu_intitution, client_name) in the second
table where nu_intitution is an integer and a foreign key of the first
table, and client_name is a text.

Someting like
create index i_clients on CLIENTS_PER_INSTITUTION (nu_intitution,
upper(client_name)) is impossible, at least in the documentation I've read.

It's just an example, but I have the similar case in many tables.

Thanks in advance for any help to solve this problem

Enediel
Linux user 300141

Happy who can penetrate the secret causes of the things
¡Use Linux!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-09 17:17:57 Re: Delete large amount of records and INSERT (with indexes) goes VERY slow
Previous Message Alvaro Herrera 2003-04-09 17:07:05 Re: Delete large amount of records and INSERT (with indexes) goes VERY slow