Re: LOCK for non-tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LOCK for non-tables
Date
Msg-id 9237.1295198922@sss.pgh.pa.us
Whole thread Raw
In response to Re: LOCK for non-tables  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: LOCK for non-tables  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Do we wish to officially document LOCK without TABLE as a good idea to
> start avoiding, in case we decide to do something about that in the
> future?

I'm still not for fixing the ambiguity that way.  TABLE is an optional
noise word in other contexts, notably GRANT/REVOKE where that syntax is
dictated by SQL standard.  It would be inconsistent to have it be
required in LOCK.

I think we should deprecate using NOWAIT without an IN...MODE clause.

Another possibility is to disallow just the single caseLOCK tablename NOWAIT
ie, you can write NOWAIT if you include *either* the object type
or the IN...MODE clause.  This is not too hard as far as the grammar
is concerned, but I'm not exactly sure how to document it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pg_basebackup for streaming base backups
Next
From: Tom Lane
Date:
Subject: Re: auto-sizing wal_buffers