Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id ED8141337BEA for ; Sun, 24 Apr 2011 12:25:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67250-05 for ; Sun, 24 Apr 2011 15:25:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail149056.authsmtp.com (outmail149056.authsmtp.com [62.13.149.56]) by mail.postgresql.org (Postfix) with ESMTP id 0AF8613364DE for ; Sun, 24 Apr 2011 12:25:12 -0300 (ADT) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt10.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p3OFPBSu055881 for ; Sun, 24 Apr 2011 16:25:11 +0100 (BST) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p3OFP93v046924 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Sun, 24 Apr 2011 16:25:10 +0100 (BST) Received: by qyk7 with SMTP id 7so421458qyk.19 for ; Sun, 24 Apr 2011 08:25:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.44.138 with SMTP id a10mr2144419qcf.255.1303658709479; Sun, 24 Apr 2011 08:25:09 -0700 (PDT) Received: by 10.229.250.140 with HTTP; Sun, 24 Apr 2011 08:25:09 -0700 (PDT) In-Reply-To: References: Date: Sun, 24 Apr 2011 16:25:09 +0100 Message-ID: Subject: Re: DELETE FROM pg_description WHERE ... From: Simon Riggs To: Erwin Brandstetter Cc: pgsql-admin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Server-Quench: 0b28caca-6e87-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MOFUSTAAU O0pfL1x7KFoHWV5D ViVKB0oLEgo/W2dq GkoTcgddY0teXgNg Uk1DQ1IcFgVhHxQE GBwfVAdzcAFZfXZ3 ekcsHnMkKiRzdgB9 RkhdF2lIZmVkYC4f AkJQJFIHIR5MKxdC d1F+AXMQaWVVb2dg R1VpYWxpN2UPcylD eAxfZWE7bWMqOAt0 az0mMAkCVWM/YAB7 NxMRJlMHF1wQKlkz Nl1pZnI1CTJaTEsY dwAA X-Authentic-SMTP: 61633235383639.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/221 X-Sequence-Number: 37402 On Fri, Apr 22, 2011 at 5:26 PM, Erwin Brandstetter wr= ote: > Hi! > > It is generally not advisable to write to system catalogs directly ... > > However, I have a database with dozens of schemas and hundreds of > tables. There is a bunch of useless comments on columns I want to get > rid of, scattered all across the db. The fastest & easiest way would > be: > > DELETE FROM pg_description WHERE description =3D 'My very special > totally useless comment.'; Why would you *not* use the COMMENT command for that? What is slower or harder about using it? --=20 =A0Simon Riggs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 http:/= /www.2ndQuadrant.com/ =A0PostgreSQL Development, 24x7 Support, Training & Services