Re: index unique - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: index unique
Date
Msg-id 20210607065501.GA17125@hjp.at
Whole thread Raw
In response to index unique  (Marc Millas <marc.millas@mokadb.com>)
Responses Re: index unique
List pgsql-general
On 2021-06-03 22:51:55 +0200, Marc Millas wrote:
> postgres 12 with postgis.
> on a table we need a primary key and to get a unique combinaison, we need 3
> columns of that table:
> 1 of type integer,
> 1 of type text,
> 1 of type geometry
>
> creating the PK constraint doesn work:

I find that if a natural primary key candidate is so complex, it is
usually better to use a surrogate key.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Ravi Krishna
Date:
Subject: Re: strange behavior of WAL files
Next
From: "Zwettler Markus (OIZ)"
Date:
Subject: AW: AW: [Extern] Re: autovacuum on pg_catalog tables