Thread: Spelling of lock names

Spelling of lock names

From
Peter Eisentraut
Date:
I plan to change the names of the locks in the MVCC chapter from

  AccessShareLock
  ShareRowExclusiveLock
  etc.

to

  access-share lock
  share-row-exclusive lock
  etc.

unless someone has a better idea.

The current spelling corresponds to the internal identifier names, but not
to any user-level command syntax, so I don't consider it appropriate for
user-level documentation.

--
Peter Eisentraut   peter_e@gmx.net


Re: Spelling of lock names

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> The current spelling corresponds to the internal identifier names, but not
> to any user-level command syntax, so I don't consider it appropriate for
> user-level documentation.

I agree that the internal coding should not dictate what the
documentation uses, but I'm not sure that I see the improvement from
    ShareRowExclusiveLock
to
    share-row-exclusive lock
when the thing the user might actually write is
    LOCK foo IN SHARE ROW EXCLUSIVE MODE

It'd seem that
    SHARE ROW EXCLUSIVE lock
(perhaps font-ifying what I've upcased here) would be the closest thing
to the user-visible syntax.

            regards, tom lane