Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B39F92E003D for ; Wed, 27 Feb 2008 11:50:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 50385-01 for ; Wed, 27 Feb 2008 11:50:06 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 6961D2E0043 for ; Wed, 27 Feb 2008 11:50:15 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=crankycanuck.ca) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1JUOXu-0000uo-4l for pgsql-admin@postgresql.org; Wed, 27 Feb 2008 10:50:14 -0500 Received: by crankycanuck.ca (Postfix, from userid 1000) id E76895002B; Wed, 27 Feb 2008 10:50:08 -0500 (EST) Date: Wed, 27 Feb 2008 10:50:08 -0500 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: how do I get table DDL from psql (not from pg_dump) Message-ID: <20080227155008.GA7920@crankycanuck.ca> Mail-Followup-To: Andrew Sullivan , pgsql-admin@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/369 X-Sequence-Number: 28443 On Wed, Feb 27, 2008 at 05:21:08AM -0600, Sofer, Yuval wrote: > I need to extract table DDL (create script) from database connection > (using sql, by retrieving system table info or by activating some pg > function) pg_dump -s does this. See the manual for more details on the switches. A