pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Christophe Pettus <xof@thebuild.com>
Cc: Dirk Krautschick <Dirk.Krautschick@trivadis.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: UUID with variable length
Date: Fri, 16 Oct 2020 11:33:53 -0400
Message-ID: <20201016153352.GN19056@tamriel.snowman.net> (raw)
In-Reply-To: <75B2C23E-3730-4BB1-ADEB-33DFC1976928@thebuild.com>
References: <AM0PR05MB6082166783DBD33747A49417E9020@AM0PR05MB6082.eurprd05.prod.outlook.com>
	<75B2C23E-3730-4BB1-ADEB-33DFC1976928@thebuild.com>

Greetings,

* Christophe Pettus (xof@thebuild.com) wrote:
> > 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.

Surely a bytea would be better and be less overhead than storing it as
text..

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (4+ messages)  latest in thread

Message-ID: <20201016153352.GN19056@tamriel.snowman.net>
Permalink:  ../20201016153352.GN19056@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20201016153352.GN19056@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, xof@thebuild.com, Dirk.Krautschick@trivadis.com
  Subject: Re: UUID with variable length
  In-Reply-To: <20201016153352.GN19056@tamriel.snowman.net>
  References: <AM0PR05MB6082166783DBD33747A49417E9020@AM0PR05MB6082.eurprd05.prod.outlook.com> <75B2C23E-3730-4BB1-ADEB-33DFC1976928@thebuild.com> <20201016153352.GN19056@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox