Re: Help with creating Documentation - Mailing list pgsql-novice

From Ashish Karalkar
Subject Re: Help with creating Documentation
Date
Msg-id 00bd01c7624a$c4c698c0$170211ac@LIONKING.COM
Whole thread Raw
In response to Help with creating Documentation  (WejofOST@aol.com)
List pgsql-novice
You can also query the database information schema to get the list of table
and there columns

select table_name,column_name,
case when character_maximum_length is null then data_type  else
data_type||'('||character_maximum_length||')'end as Datatype_Length,case
when is_nullable='YES' then '' else ' NOT NULL ' end  as Constraints1
 from information_schema.columns where table_schema='public' order by
table_name,ordinal_position


----- Original Message -----
From: "joseph speigle" <joesp@sirfsup.com>
To: <pgsql-novice@postgresql.org>
Sent: Friday, March 09, 2007 8:01 AM
Subject: Re: [NOVICE] Help with creating Documentation


>> I have inherited a pgsql database and a raft of PHP programs.
>> I am a "novice" as far as pgsql is concerned although as a mainframe
>> dinosaur I have knowledge of a number of RDBS systems plus MS-SQL and
>> MySQL .
>> The PHP code is quite readable but on the database side the previous
>> owner
>> did not believe in documentation!
>>
>> How can I generate a list of tables and then fields within the tables in
>> pgsql?
>>
>
> maybe you just want to dump all the DDL at one time
> @localhost] pg_dump db_name > db_name.txt
>
> --
> joe speigle
> www.sirfsup.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>                http://www.postgresql.org/about/donate


pgsql-novice by date:

Previous
From: "Ashish Karalkar"
Date:
Subject: Re: Installing Problem: User Account Exists
Next
From: "Duncan Garland"
Date:
Subject: System Log