Skip site navigation (1) Skip section navigation (2)

Re: "drop function" vs. "delete from pg_proc"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob Fischer <citibob(at)capu(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: "drop function" vs. "delete from pg_proc"
Date: 2001-01-24 16:39:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Bob Fischer <citibob(at)capu(dot)net> writes:
> I'm considering writing some semi-automatic software that would create
> and drop functions in a PostgreSQL database.  I'm considering whether my
> software must use the "drop function" command, or whether it can get
> away with issuing "delete from pg_proc" commands.  Is it safe to drop
> functions by deleting from the pg_proc table?

At the moment, I believe so, but you open yourself up to all sorts of
future compatibility problems if you munge system catalogs directly.
(Also, the direct delete won't work if you are not superuser.)

Is there a good reason not to use DROP?

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Roberto BertolussoDate: 2001-01-24 21:29:34
Subject: Cannot CREATE INDEX that contains a function
Previous:From: The Hermit HackerDate: 2001-01-24 16:31:44
Subject: Re: When replication?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group