X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4997F9DC8A1 for ; Sun, 26 Feb 2006 22:51:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21626-03 for ; Sun, 26 Feb 2006 22:51:54 -0400 (AST) X-Greylist: delayed 00:11:44.560492 by SQLgrey- Received: from mailrouter.internal.box (unknown [203.48.241.83]) by postgresql.org (Postfix) with ESMTP id 319EC9DC860 for ; Sun, 26 Feb 2006 22:51:46 -0400 (AST) Received: from localhost (localhost [IPv6:::1]) by mailrouter.internal.box (Postfix) with ESMTP id 49E9D2211A7 for ; Mon, 27 Feb 2006 13:56:20 +1100 (EST) From: "Bath, David" Reply-To: dave.bath@unix.net To: pgsql-sql@postgresql.org Subject: Dump/restore comments only? Date: Mon, 27 Feb 2006 13:56:17 +1100 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602271356.18537.dave.bath@unix.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200602/321 X-Sequence-Number: 24331 Folks, There have been a number of times when I've wanted to ignore everything in a dump file apart from comments. I am interested not just in comments for tables/views/columns but constraints, indices and functions as well. Many of my comments are multi-line and often resemble manpages, so a simple grep for '^COMMENT ON' will not work for me. Has anyone got a script/view in SQL that will generate fully-qualified COMMENT ON statements from the pg_catalog/information_schema, a sed|awk|perl script to munge the ascii file produced by pg_dump, or even pg_dump undocumented options that might help me? (If there are no such options for dump/restore, might these be useful inclusions in the future?) Thanks in advance. -- David T. Bath dave.bath@unix.net