Search Postgresql Archives

Re: looking for a globally unique row ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 16 Sep 2017 12:15:46 +0200
Rafal Pietrak <rafal@xxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux