how to examin the database structure with an sql command

From: Hans Jeuken <haje(at)toneel(dot)demon(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: how to examin the database structure with an sql command
Date: 2001-02-27 16:11:07
Message-ID: 983290489.1810.0.pluto.d4ee6a22@news.demon.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I am busy writing a table editor in Perl, using the module Pg.pm as
interface to Postgresql. When opening a table in that editor I would like
to find out how the tables in the database are defined.

So far I have considered doing a pg_dump to a file and then examine the
content, but it is so unelegant.

then I have considered the query "SELECT * FROM pga_layout". Problem here
is that the table pga_layout only not defined when the database has no
tuples yet.

Who is able to give me the big hint here?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gunnar R|nning 2001-02-27 16:11:16 Re: Query precompilation?
Previous Message Joel Burton 2001-02-27 16:08:08 Re: Case sensitivity