On Mon, 17 Jul 2000, Philip Warner wrote:
> I would have thought that the database itself should be the tool used to
> display SQL, and if not the database, then one of the interface libraries.
SQL is only one of the many formats that people might want meta data in.
psql and pgaccess, for example, have somewhat different requirements.
The SQL standard defines a large set of information schema views which
provide the database metadata in a portable fashion, from there it should
be a relatively short distance to the format of your choice, and the
maintainance problem across releases is decreased.
Of course without schema support these views would intolerably clutter the
user name space, but I could think of a couple of ways to work around that
for the moment.
Btw., in your wheeling and dealing in pg_dump you might want to look at
the format_type function I added, which is a step in this direction.
(examples in psql/describe.c)
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden