X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C5CF83A3B6B for ; Tue, 16 Nov 2004 16:14:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86154-07 for ; Tue, 16 Nov 2004 16:13:59 +0000 (GMT) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id 9326A3A3C42 for ; Tue, 16 Nov 2004 16:13:59 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id 05AC6564AE; Tue, 16 Nov 2004 17:13:56 +0100 (CET) Received: from www.credativ.de (pD95014D0.dip0.t-ipconnect.de [217.80.20.208]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id 901F3564AF; Tue, 16 Nov 2004 17:13:42 +0100 (CET) Received: from bell.credativ.de (bell.credativ.de [172.26.14.16]) by www.credativ.de (Postfix) with ESMTP id 0BDE11C0029; Tue, 16 Nov 2004 17:13:36 +0100 (CET) From: Peter Eisentraut To: Bruno =?iso-8859-15?q?Pr=E9vost?= Subject: Re: Table definition Date: Tue, 16 Nov 2004 17:13:34 +0100 User-Agent: KMail/1.6.2 Cc: References: <02ac01c4cbe5$2effc580$5d00a8c0@BRUNO2500> <200411161616.48196.peter_e@gmx.net> <03bd01c4cbf2$8a8babf0$5d00a8c0@BRUNO2500> In-Reply-To: <03bd01c4cbf2$8a8babf0$5d00a8c0@BRUNO2500> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 8bit Message-Id: <200411161713.34830.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/150 X-Sequence-Number: 19469 Am Dienstag, 16. November 2004 16:40 schrieb Bruno Prévost: > I need to use it in sql. There is no direct way to do this in SQL, but I can offer you the following alternative: CREATE FUNCTION get_table_definition(text) RETURNS text AS ' #!/bin/sh pg_dump -t $1 ' LANGUAGE plsh; :) -- Peter Eisentraut http://developer.postgresql.org/~petere/