Search Postgresql Archives

Re: Inspecting a DB - psql or system tables ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/27/2011 01:24 PM, Andre Majorel wrote:
While parsing the output of psql is cumbersome, accessing the
system tables seems more likely to break whenever a new version
of PostgreSQL comes out.

I think you have this backwards. If there's a change in this area big enough to justify changing the format of the system tables, odds are the text output from psql is going to be changed too. psql gets tweaked to display information better more often than the internals are altered.

Approaches you can take here, from most robust in the face of changes to most fragile, in my mind are:

1) Use information_schema. If all the info you need is in here, great; it may not be though.
2) Use the system catalog data directly
3) Parse text output from psql.

--
Greg Smith   2ndQuadrant US    greg@xxxxxxxxxxxxxxx   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux