On Mon, 2003-04-21 at 11:30, scott.marlowe wrote:
> 'show tables' is SQL, and can be run from a script, with the output
> parsed.
But "select * from pg_tables" (or the equivalent query on the
information schemas) is SQL, can be run from a script, and can be parsed
by a client application.
> But, how do I write an app to ask such questions easily? psql -E is not
> the easiest and most intuitive way to learn how to get the data into a
> structure for parsing in a client side app.
You're conflating two distinct issues: (1) providing an interface for
CLI use by the DBA (2) providing an API for programmer use in
applications.
If you think the existing system catalogs are not sufficiently
intuitive, then we should fix that problem properly (for example,
through better documentation), not by copying some ad-hoc syntax from
another RDBMS.
If you think the existing CLI interface (\d etc.) is not sufficiently
intuitive (which has been what a couple people in this thread have
argued), I don't see what that has to do with client side applications
or parsing the output.
Cheers,
Neil