Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F34432E00A1 for ; Thu, 20 Mar 2008 01:08:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 58037-01 for ; Thu, 20 Mar 2008 01:08:47 -0300 (ADT) X-Greylist: delayed 02:00:16.838636 by SQLgrey-1.7.5 Received: from mail.int.journyx.com (mail.journyx.com [66.219.41.227]) by postgresql.org (Postfix) with ESMTP id 7BA7B2E009F for ; Thu, 20 Mar 2008 01:08:48 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.int.journyx.com (Postfix) with ESMTP id 984D33E2107; Wed, 19 Mar 2008 15:24:26 -0500 (CDT) X-Virus-Scanned: amavisd-new at Received: from mail.int.journyx.com ([127.0.0.1]) by localhost (mail.int.journyx.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0neuJX9BoN04; Wed, 19 Mar 2008 15:24:13 -0500 (CDT) Received: from dev3.int.journyx.com (dev3.int.journyx.com [192.168.100.89]) by mail.int.journyx.com (Postfix) with ESMTP id 269BE3E2158; Wed, 19 Mar 2008 15:24:13 -0500 (CDT) Received: from dev3.int.journyx.com (localhost.localdomain [127.0.0.1]) by dev3.int.journyx.com (8.13.1/8.13.1) with ESMTP id m2JKOC1u024598; Wed, 19 Mar 2008 15:24:12 -0500 Received: (from planders@localhost) by dev3.int.journyx.com (8.13.1/8.13.1/Submit) id m2JKOC7N024597; Wed, 19 Mar 2008 15:24:12 -0500 Date: Wed, 19 Mar 2008 15:24:12 -0500 From: Preston Landers To: Yusnel Rojas Garc?a Cc: pgsql-sql@postgresql.org Subject: Re: pg_dump using SQL Message-ID: <20080319202412.GJ25994@journyx.com> References: <9f45496e0803181245v78508709g325d28012ff381a6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f45496e0803181245v78508709g325d28012ff381a6@mail.gmail.com> User-Agent: mutt-ng/devel-r804 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200803/131 X-Sequence-Number: 30459 Yusnel Rojas Garc?a(onemoverx@gmail.com)@2008.03.18 11:45:03 -0800: > Hi everyone > > Is there any way to do what pg_dump does?, I mean, get the structure of a > table in a database (ex: CREATE TABLE ...) > If you want to programmaticly discover the elements in a database schema then you can always query the INFORMATION_SCHEMA: http://www.postgresql.org/docs/current/static/information-schema.html That isn't the same as having the raw DLL statements that created them, but depending on your purpose may be good enough. regards, Preston