Re: Example 43.6. A PL/pgSQL Trigger Function for Maintaining a Summary Table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Example 43.6. A PL/pgSQL Trigger Function for Maintaining a Summary Table
Дата
Msg-id 1688333.1698459414@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Example 43.6. A PL/pgSQL Trigger Function for Maintaining a Summary Table  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-docs
Daniel Gustafsson <daniel@yesql.se> writes:
> Thanks, I'll await pushing and backpatching if Tom who committed it has
> insights into whether it was missed or if it indeed serves a purpose.

Hey, I just pushed that for somebody else, I don't claim authorship ;-)

It seems clear that the example intends to show a star-schema database
where the fact table refers to various dimension tables.  But it's
incomplete --- there's no foreign-key constraint on time_key, and
even less infrastructure for product_key or store_key.  I don't
have the cited book either, so I don't know how complete the original
example was.  Perhaps the bit in the trigger function about forbidding
updates to time_key has something to do with that model.

Anyway, I don't see any reason to object to this patch.  The extra
table isn't adding much.  My only thought is would it make sense to
change time_key to be a timestamp or timestamptz value?

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Typo in docs for "recovery_init_sync_method" parameter.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: "22.3. Template Databases" documentation is incomplete