Re: Primary keys and composite unique keys(basic question)

From: Hemil Ruparel <hemilruparel2002(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Primary keys and composite unique keys(basic question)
Date: 2021-04-02 06:56:54
Message-ID: CANW1aT97xBzo0XoPeEuo2NZr6SAMU+dCs5mCLVOpom0aYOLvOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I used uuid4 for customer ids because i needed to interface with payment
providers. Is that wrong? All other places except transaction ids, i have
used serial ints

On Fri 2 Apr, 2021, 8:56 AM Rob Sargent, <robjsargent(at)gmail(dot)com> wrote:

> On 4/1/21 8:28 PM, Merlin Moncure wrote:
> >
> > This is one of the great debates in computer science and it is not
> > settled. There are various tradeoffs around using a composite key
> > derived from the data (aka natural key) vs generated identifiers. It's
> > a complex topic with many facets: performance, organization,
> > validation, and correctness are all relevant considerations. I would
> > never use UUIDS for keys though.
> >
> > merlin
> >
> >
> And, pray tell, for what exactly would you use universally unique
> identifiers.
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pierre Forstmann 2021-04-02 07:06:59 Re: Copy Statistics Tables During Upgrade
Previous Message Bryn Llewellyn 2021-04-02 04:46:58 Have I found an interval arithmetic bug?