Re: DELETE FROM pg_description WHERE ...

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Erwin Brandstetter <brsaweda(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: DELETE FROM pg_description WHERE ...
Date: 2011-04-24 15:25:09
Message-ID: BANLkTikCbyLiad2C9ELzMMxecJ1-bD69fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Apr 22, 2011 at 5:26 PM, Erwin Brandstetter <brsaweda(at)gmail(dot)com> wrote:
> 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 = 'My very special
> totally useless comment.';

Why would you *not* use the COMMENT command for that?

What is slower or harder about using it?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2011-04-24 16:27:46 Re: DELETE FROM pg_description WHERE ...
Previous Message Craig James 2011-04-24 00:49:09 Re: select for update