Received: from pop2-rme.xtra.co.nz (pop2-rme.xtra.co.nz [203.96.92.7]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA97765 for ; Thu, 18 May 2000 18:10:31 -0400 (EDT) (envelope-from csawtell@xtra.co.nz) Received: from berty ([210.55.120.28]) by pop2-rme.xtra.co.nz (InterMail vM.4.01.02.17 201-229-119) with SMTP id <20000518220954.UUY984705.pop2-rme.xtra.co.nz@berty>; Fri, 19 May 2000 10:09:54 +1200 From: Christopher Sawtell Organization: iOpen Technologies Ldt To: Bruce Momjian Subject: Re: Re[2]: lower() for varchar data by creating an index Date: Fri, 19 May 2000 09:18:56 +1200 X-Mailer: KMail [version 1.0.29.1] Content-Type: text/plain References: <200005181544.LAA20879@candle.pha.pa.us> In-Reply-To: <200005181544.LAA20879@candle.pha.pa.us> Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Message-Id: <00051910112500.13566@berty> Content-Transfer-Encoding: 8bit X-Archive-Number: 200005/74 On Fri, 19 May 2000, Bruce Momjian wrote: > > Bruce Momjian writes: > > >> You can get rid of it by deleting the pg_proc tuple directly. I wonder > > >> though whether RemoveFunction isn't being overly protective --- is there > > >> any good reason not to allow people to delete built-in functions? > > >> Obviously you have only yourself to blame if you delete integer equals > > >> or something equally critical ;-) ... but there are a boatload of > > >> built-ins that are by no means critical. Comments anyone? > > > > > I would throw a notice and keep going. Should I commit the change? > > > > What's the point of a notice? "You just deleted OID equals. Better > > luck with your next database." Either we think this is too dangerous to > > be allowed even to the dbadmin, or we don't. > > > > Actually, isn't there a backend switch that you have to set in order to > > do *really* dangerous stuff (DML operations on the system classes, for > > example)? Maybe the right answer is to allow deletion of builtin > > function entries only when that's set. > > > > But on third thought, it's a little silly to guard the pg_proc entries > > so carefully when we'll happily let the admin blow away the > > corresponding pg_operator entries. So I'd say just lose that error > > check completely... > > > But I think we should make sure they know they just deleted a built-in. > Seems like good feedback to a user who accidentally deletes one then > can't figure out why his database is busted. I can see that happening, > and a NOTICE helps prevent really stupid bug reports. Perhaps this might be a possible idea: 1) Only let the PostgreSQL `super-user' delete internal functions, 2) Let her delete the delete the non-essential functions with a default to yes question before deleteion 3) Let her delete the nearly essential functions with a stronger worded message and a default to no. 4) Do not allow deleteion of vital functions. Somewhere in the doco please describe how to replace the functions from the template or where-ever. -- Sincerely etc., NAME Christopher Sawtell - iOpen Technologies Ltd. CELL PHONE 021 257 4451 ICQ UIN 45863470 EMAIL chris @ iopen . co . nz, csawtell @ xtra . co . nz WWW http://www.iopen.co.nz CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz -->> Please refrain from using HTML or WORD attachments in e-mails to me <<--