Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8DA702E3604 for ; Mon, 17 Dec 2007 12:54:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 62054-01-9 for ; Mon, 17 Dec 2007 12:53:58 -0400 (AST) Received: from df39.dot5hosting.com (df39.dot5hosting.com [72.22.92.64]) by postgresql.org (Postfix) with SMTP id E18222E3202 for ; Mon, 17 Dec 2007 12:52:11 -0400 (AST) Received: (qmail 90463 invoked by uid 3128); 17 Dec 2007 16:56:41 -0000 Received: from 127.0.0.1 by df39.dot5hosting.com (envelope-from , uid 1002) with qmail-scanner-1.25st (clamdscan: 0.88/1245. spamassassin: 3.1.0. perlscan: 1.25st. Clear:RC:1(127.0.0.1):SA:0(-2.8/5.0):. Processed in 3.84251 secs); 17 Dec 2007 16:56:40 -0000 Received: from unknown (HELO df39.dot5hosting.com.com) (127.0.0.1) by df39.dot5hosting.com with SMTP; 17 Dec 2007 16:56:36 -0000 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 From: To: pgsql-sql@postgresql.org Subject: Describe Table Reply-To: danap@dandymadeproductions.com X-Origin: 216.129.226.161 Date: Mon, 17 Dec 2007 08:56:32 -0800 X-Uidl: 1197910592903417266 X-Mailer: AtMail 4.03 X-Qmail-Scanner-Message-ID: <119791059792290394@df39.dot5hosting.com> Message-Id: <20071217165211.E18222E3202@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/90 X-Sequence-Number: 29782 I've reviewed much of the documentation and the forums,=0D but unable to seem to find a easy way to obtain the same=0D thing as the 'psql \d table' through sql. I know I can create=0D through collecting info on table, but seems there must be an=0D easier way. I desire to create a standard type SQL dump=0D syntax.=0D =0D ex.=0D DROP TABLE IF EXISTS postgresqltypes;=0D CREATE TABLE postgresqltypes (=0D =0D -- Table id and creation data entries.=0D =0D data_type_id serial NOT NULL,=0D smallInt_type smallint DEFAULT NULL,=0D int_type integer DEFAULT NULL,=0D bigInt_type bigint DEFAULT NULL,=0D decimal_type decimal(16,2) DEFAULT NULL,=0D numeric_type numeric(10,2) DEFAULT NULL,=0D real_type real DEFAULT NULL,=0D doublePrecision_type double precision DEFAULT NULL,=0D serial_type serial,=0D bigSerial_type bigserial,=0D PRIMARY KEY (data_type_id));=0D =0D dana. =0D =0D =0D =0D