Re: UUID with variable length - Mailing list pgsql-general

From Christophe Pettus
Subject Re: UUID with variable length
Date
Msg-id 75B2C23E-3730-4BB1-ADEB-33DFC1976928@thebuild.com
Whole thread Raw
In response to UUID with variable length  (Dirk Krautschick <Dirk.Krautschick@trivadis.com>)
Responses Re: UUID with variable length  (Stephen Frost <sfrost@snowman.net>)
List pgsql-general

> On Oct 15, 2020, at 13:49, Dirk Krautschick <Dirk.Krautschick@trivadis.com> wrote:
> Or do you have some other ideas how to use a primary key datatype like UUID but with variable length?

You're probably best off storing it as a VARCHAR() with a check constraint or constraint trigger that validates it.

--
-- Christophe Pettus
   xof@thebuild.com




pgsql-general by date:

Previous
From: Dirk Krautschick
Date:
Subject: Date Format 9999-12-31-00.00.00.000000
Next
From: Adrian Klaver
Date:
Subject: Re: Date Format 9999-12-31-00.00.00.000000