Re: check if database is correctly created

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: check if database is correctly created
Дата
Msg-id 5574.1187191321@sss.pgh.pa.us
обсуждение исходный текст
Ответ на check if database is correctly created  ("Alain Roger" <raf.news@gmail.com>)
Список pgsql-general
"Alain Roger" <raf.news@gmail.com> writes:
> i would like to check (via PHP or C#) if my database has been correctly
> created.
> for that i use the following SQL :
> select * from pg_tables where tablename = 'xxx' AND schemaname = 'yyy';
> this i repeat till i check all tables.
> But how to check sequences, index, functions, and so on ?

Instead of re-inventing the wheel, why not run "pg_dump -s" and diff its
output against that from a known good database?

I think there is a more sophisticated "database diff" tool out there,
too ... maybe on pgfoundry.

            regards, tom lane

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

Предыдущее
От: "Phoenix Kiula"
Дата:
Сообщение: Re: Yet Another COUNT(*)...WHERE...question
Следующее
От: "Phoenix Kiula"
Дата:
Сообщение: Customizing psql console to show execution times