Re: Preserving the source code of views

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: Preserving the source code of views
Дата
Msg-id CAB8KJ=h9jvDou0Y+tifuJq+bTO5sLZQhmUjQGA=H45RhuFibpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Preserving the source code of views  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
2013/10/22 Stephen Frost <sfrost@snowman.net>:

>> You also mentioned an external CMS. Any suggestions?
>
> I'm a big fan of git, but if you really want to keep things in-database
> and track dependencies, etc, it occurs to me that you might be able to
> use an actual table in the database to store the raw form of your view
> definitions and then have an SP or something which can link up that
> table to the actual views in the database and then you can look at
> dependencies through the PG system catalogs...
>
> Haven't really thought this through completely, but wanted to mention
> the idea as it might help you.

At my current workplace, view definitions (which are very old-school with
revision history etcetera recorded in comments) are stored in PL/PgSQL functions
which are updated and executed whenever views are modified. I'm looking at
adding a wrapper function to automatically detect and recreate dependencies,
not sure how well that would work. We keep track of schema changes via
pg_extractor[1] which integrates quite nicely with GIT.

[1] https://github.com/omniti-labs/pg_extractor

Regards

Ian Barwick


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pg_dump resulting in excessive memory use by postmaster process
Следующее
От: "Ben"
Дата:
Сообщение: Re: pg_dump resulting in excessive memory use by postmaster process