Re: [GENERAL] looking for a globally unique row ID - Mailing list pgsql-general

From Jehan-Guillaume (ioguix) de Rorthais
Subject Re: [GENERAL] looking for a globally unique row ID
Date
Msg-id 20170918172610.07b92105@firost
Whole thread Raw
In response to Re: [GENERAL] looking for a globally unique row ID  (Rafal Pietrak <rafal@ztk-rp.eu>)
Responses Re: [GENERAL] looking for a globally unique row ID  (Rafal Pietrak <rafal@ztk-rp.eu>)
List pgsql-general
On Sat, 16 Sep 2017 12:15:46 +0200
Rafal Pietrak <rafal@ztk-rp.eu> wrote:

> W dniu 16.09.2017 o 09:33, Jehan-Guillaume de Rorthais pisze:
> >   
> [-------------]
> > 
> > I wrote something about this some years ago, this might do the trick for
> > you, maybe with some adjustments depending on your schema. The main idea
> > should help anyway. See:
> > 
> > http://blog.ioguix.net/postgresql/2015/02/05/Partitionning-and-constraints-part-1.html
> >   
> 
> For the document management schema I need a way to avoid partitioning of
> "process-tables", and still be able to FK from it into the document
> class forest of inherited tables. Just uniqueness of IDs across that
> forest is not enough ... although nice to have, I admit. Good & handy
> article. I'll keep a reference to it.

Well, as I wrote in my email, it requiers some adjustments IRW your schema,
meaning you'll have to hack around to make it fit your need.

About FK, just look at pgsql trigger code around real FK and adjust to your
need by creating custom FK trigger either in plpgsql or C. IIRC, there's a
contrib module doing FK as well, look at "contrib/spi/refint.c".


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: [GENERAL] Selecting a daily puzzle record - which type of columnto add?
Next
From: marcelo
Date:
Subject: [GENERAL] Call a builtin function from Devart's linqConnect