"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