Re: exploiting features of pg to obtain polymorphism maintaining ref. integrity

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: exploiting features of pg to obtain polymorphism maintaining ref. integrity
Дата
Msg-id 20061007011222.42819.qmail@web31811.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на exploiting features of pg to obtain polymorphism maintaining ref. integrity  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: exploiting features of pg to obtain polymorphism  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список pgsql-general
> Is there any good documentation, example, tutorial, pamphlet, discussion... to exploit pg
> features to obtain "polymorphic" behavior without renouncing to referential integrity?
>
> Inheritance seems *just* promising.
>
> Any methodical a approach to the problem in pg context?

I don't know if this is what you are after, but is was a VERY interesting discussion that sounds
similar to what your are looking for?

http://archives.postgresql.org/pgsql-sql/2006-05/msg00179.php
http://archives.postgresql.org/pgsql-general/2006-05/msg01125.php

basically the OP, wanted to create a template/parent schema.

next he would create a new schema for each client and then create inherited tables from the parent
schema.

Then he would create views/fuctions that would work on the tables in the current schema.

Last he would set the search_path to the schema of any client of enterest and use the default
views/funtions of the newly set search_path of currently set schema.


One advantage (possible the polymorphism you were looking for) with this design was that any
modifications made to the template/parent schema would cascade to all of the client schemas as a
feature of table inheritance.  And he could also summarize all of the data from all clients by
selecting from the template/parent schema.

Regards,

Richard Broersma Jr.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: how to check SQLSTATE
Следующее
От: "Talha Khan"
Дата:
Сообщение: Re: shared_buffer setting