Re: Memo on dropping practices

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)zort(dot)ca>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Memo on dropping practices
Date: 2002-07-13 20:08:46
Message-ID: 200207132008.g6DK8kY26206@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> The correct thing to do is to call performDeletion() with a parameter
>
> > Should it be called performDrop rather than Deletion?
>
> Well, if you want to rationalize the naming of these various routines:
>
> I think DROP ought to be associated with the SQL-level commands.
> performDeletion is the next level down (since it doesn't do any
> permissions checks) and then there are the bottom-level deletion
> routines for each object type (which do even less). It would make sense
> to choose different verbs for each level. Right now, since I just split
> RemoveFoo into two routines and called the second one RemoveFooById,
> it's not very mnemonic at all. Perhaps:
>
> DropFoo --- top level, corresponds to SQL DROP command
>
> performSomething -- dependency controller
>
> RemoveFoo --- bottom level deleter
>
> Not sure what "performSomething" should be called, but I'd like to
> think of a verb that's not either Drop or Remove. I'm not wedded to
> Remove for the bottom level, either. Thoughts?

How about:

> DropFoo --- top level, corresponds to SQL DROP command
> DropCascadeFoo --- dependency controller
> RemoveFoo --- bottom level deleter

Is that accurate for cascade?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message J. R. Nield 2002-07-13 21:53:50 Re: pgbench questions
Previous Message Alvaro Herrera 2002-07-13 19:35:55 Re: help needed with CREATE CONVERSION