Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2F70E9FB859 for ; Mon, 2 Apr 2007 11:33:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 96829-05-5 for ; Mon, 2 Apr 2007 11:33:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A74AA9FB71A for ; Mon, 2 Apr 2007 11:28:19 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from fafnir.androme.com (fafnir.androme.com [62.58.96.158]) by svr4.postgresql.org (Postfix) with ESMTP id 7FA0F5AF8C8 for ; Mon, 2 Apr 2007 14:28:18 +0000 (GMT) Received: by fafnir.androme.com (Postfix, from userid 1003) id 7DDE8B967D2; Mon, 2 Apr 2007 16:28:15 +0200 (CEST) Message-ID: <461112F9.70101@andromeiberica.com> Date: Mon, 02 Apr 2007 16:28:09 +0200 From: Arnau Reply-To: arnaulist@andromeiberica.com, arnaulist@andromeiberica.com User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Dumping views, functions, ... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.385 tagged_above=0 required=5 tests=BAYES_50=0.001, SPF_SOFTFAIL=1.384 X-Spam-Level: * X-Archive-Number: 200704/11 X-Sequence-Number: 25075 Hi all, Lets say that in my database I have a view named foo_view and I'd like to dump it's definition. I'd like to do something like: pg_dump --view=foo_view bar_db > foo_view.log so I'd have in the foo_view.log file the foo_view's definition. This same concept I'm searching to apply it to rules, functions, ... I have been looking into pg_dump options and I haven't found the way. The most similar thing I have found is -t option that does what I need but with tables. Is it possible to do this with pg_dump? Thanks -- Arnau