Re: Layout question

Поиск
Список
Период
Сортировка
От Pierre Thibaudeau
Тема Re: Layout question
Дата
Msg-id 74b035bb0604062118k706f289dl3958a33f1bfe7208@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Layout question  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-novice
If you really need the behavior of two tables, you might consider looking at
inheritance.

I have something similar to your setup, and I use what Jan suggested.  In my case, the tables "textfiles" and "binaryfiles" inherit from "files".  My table "files" (and therefore the two children) contains a column "kind" that differentiates between the two children:  it's a one-character field, constrained to be equal to either 't' or 'b'. In the children tables, I addded to that column a default value: 't' in one case and 'b' in the other.

It's not perfectly satisfactory, but it's the best I have found so far..

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

Предыдущее
От: "Pierre Thibaudeau"
Дата:
Сообщение: Foreign keys and inheritance
Следующее
От: shakil tanvir
Дата:
Сообщение: Scheduled Job at PostgreSQL