Обсуждение: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

Поиск
Список
Период
Сортировка

Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Robert Haas
Дата:
On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Add missing keywords to gram.y's unreserved_keywords list.
>
> We really need an automated check for this ... and did VALIDATE really
> need to become a keyword at all, rather than picking some other syntax
> using existing keywords?

I think we ought to try to do something about this, so that VALIDATE
doesn't need to become a keyword.

How about instead of VALIDATE CONSTRAINT we simply write ALTER
CONSTRAINT ... VALID?  (Patch attached, passes make check.)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Alvaro Herrera
Дата:
Excerpts from Robert Haas's message of vie mar 11 15:59:40 -0300 2011:
> On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Add missing keywords to gram.y's unreserved_keywords list.
> >
> > We really need an automated check for this ... and did VALIDATE really
> > need to become a keyword at all, rather than picking some other syntax
> > using existing keywords?
> 
> I think we ought to try to do something about this, so that VALIDATE
> doesn't need to become a keyword.
> 
> How about instead of VALIDATE CONSTRAINT we simply write ALTER
> CONSTRAINT ... VALID?  (Patch attached, passes make check.)

Please make-check the docs too.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Heikki Linnakangas
Дата:
On 11.03.2011 20:59, Robert Haas wrote:
> On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane<tgl@sss.pgh.pa.us>  wrote:
>> Add missing keywords to gram.y's unreserved_keywords list.
>>
>> We really need an automated check for this ... and did VALIDATE really
>> need to become a keyword at all, rather than picking some other syntax
>> using existing keywords?
>
> I think we ought to try to do something about this, so that VALIDATE
> doesn't need to become a keyword.
>
> How about instead of VALIDATE CONSTRAINT we simply write ALTER
> CONSTRAINT ... VALID?  (Patch attached, passes make check.)

ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as 
valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the 
constraint is valid.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Robert Haas
Дата:
On Fri, Mar 11, 2011 at 2:39 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> On 11.03.2011 20:59, Robert Haas wrote:
>>
>> On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane<tgl@sss.pgh.pa.us>  wrote:
>>>
>>> Add missing keywords to gram.y's unreserved_keywords list.
>>>
>>> We really need an automated check for this ... and did VALIDATE really
>>> need to become a keyword at all, rather than picking some other syntax
>>> using existing keywords?
>>
>> I think we ought to try to do something about this, so that VALIDATE
>> doesn't need to become a keyword.
>>
>> How about instead of VALIDATE CONSTRAINT we simply write ALTER
>> CONSTRAINT ... VALID?  (Patch attached, passes make check.)
>
> ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
> valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
> constraint is valid.

Yeah, it's a little awkward, but I think it's still better than adding
another keyword.  Any other ideas for wording?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
David Christensen
Дата:
On Mar 11, 2011, at 1:40 PM, Robert Haas wrote:

> On Fri, Mar 11, 2011 at 2:39 PM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> On 11.03.2011 20:59, Robert Haas wrote:
>>> 
>>> On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane<tgl@sss.pgh.pa.us>  wrote:
>>>> 
>>>> Add missing keywords to gram.y's unreserved_keywords list.
>>>> 
>>>> We really need an automated check for this ... and did VALIDATE really
>>>> need to become a keyword at all, rather than picking some other syntax
>>>> using existing keywords?
>>> 
>>> I think we ought to try to do something about this, so that VALIDATE
>>> doesn't need to become a keyword.
>>> 
>>> How about instead of VALIDATE CONSTRAINT we simply write ALTER
>>> CONSTRAINT ... VALID?  (Patch attached, passes make check.)
>> 
>> ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
>> valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
>> constraint is valid.
> 
> Yeah, it's a little awkward, but I think it's still better than adding
> another keyword.  Any other ideas for wording?


CHECK VALID?

Regards,

David
--
David Christensen
End Point Corporation
david@endpoint.com






Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Andrew Dunstan
Дата:

On 03/11/2011 02:50 PM, David Christensen wrote:
> On Mar 11, 2011, at 1:40 PM, Robert Haas wrote:
>
>> On Fri, Mar 11, 2011 at 2:39 PM, Heikki Linnakangas
>> <heikki.linnakangas@enterprisedb.com>  wrote:
>>> On 11.03.2011 20:59, Robert Haas wrote:
>>>> On Tue, Mar 8, 2011 at 4:44 PM, Tom Lane<tgl@sss.pgh.pa.us>   wrote:
>>>>> Add missing keywords to gram.y's unreserved_keywords list.
>>>>>
>>>>> We really need an automated check for this ... and did VALIDATE really
>>>>> need to become a keyword at all, rather than picking some other syntax
>>>>> using existing keywords?
>>>> I think we ought to try to do something about this, so that VALIDATE
>>>> doesn't need to become a keyword.
>>>>
>>>> How about instead of VALIDATE CONSTRAINT we simply write ALTER
>>>> CONSTRAINT ... VALID?  (Patch attached, passes make check.)
>>> ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
>>> valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
>>> constraint is valid.
>> Yeah, it's a little awkward, but I think it's still better than adding
>> another keyword.  Any other ideas for wording?
>
> CHECK VALID?
>
>


SET VALID? (c.f. SET NULL).

cheers

andrew


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Tom Lane
Дата:
Andrew Dunstan <andrew@dunslane.net> writes:
> On 03/11/2011 02:50 PM, David Christensen wrote:
>> On Mar 11, 2011, at 1:40 PM, Robert Haas wrote:
>>> ALTER CONSTRAINT ... VALID sounds like it just marks the constraint as
>>> valid. "VALIDATE CONSTRAINT" sounds like it scans and checks that the
>>> constraint is valid.

> SET VALID? (c.f. SET NULL).

That sounds the best so far, but maybe we should think about other
phrases altogether (ie, not arising from the word "valid")?  I don't
have any great ideas offhand, just trying to think outside the box.
        regards, tom lane


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Robert Haas
Дата:
On Fri, Mar 11, 2011 at 3:00 PM, Andrew Dunstan <adunstan@postgresql.org> wrote:
> On 03/11/2011 02:56 PM, Andrew Dunstan wrote:
>>
>>
>>
>> SET VALID? (c.f. SET NULL).
>
> Of course I mean SET NOT NULL.
>
>
> Anyway, the full thing would be something like
>
>
> ALTER TABLE foo SET VALID CONSTRAINT bar;

Or ALTER TABLE foo SET CONSTRAINT bar VALID
Or ALTER TABLE foo ALTER CONSTRAINT bar SET VALID

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
"Kevin Grittner"
Дата:
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> SET VALID? (c.f. SET NULL).
> 
> That sounds the best so far, but maybe we should think about other
> phrases altogether (ie, not arising from the word "valid")?  I
> don't have any great ideas offhand, just trying to think outside
> the box.
At the risk of adding yet another meaning to an
already-heavily-worked word, ANALYZE?
-Kevin


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Andrew Dunstan
Дата:
On 03/11/2011 02:56 PM, Andrew Dunstan wrote:
>
>
>
> SET VALID? (c.f. SET NULL).

Of course I mean SET NOT NULL.


Anyway, the full thing would be something like


ALTER TABLE foo SET VALID CONSTRAINT bar;


cheers

andrew


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Robert Haas
Дата:
On Fri, Mar 11, 2011 at 3:10 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Andrew Dunstan <andrew@dunslane.net> writes:
>
>>> SET VALID? (c.f. SET NULL).
>>
>> That sounds the best so far, but maybe we should think about other
>> phrases altogether (ie, not arising from the word "valid")?  I
>> don't have any great ideas offhand, just trying to think outside
>> the box.
>
> At the risk of adding yet another meaning to an
> already-heavily-worked word, ANALYZE?

Well, we don't seem to really have consensus around anything in
particular here.  Should we just leave it alone, or is this worth
spending more effort on?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Re: [COMMITTERS] pgsql: Add missing keywords to gram.y's unreserved_keywords list.

От
Tom Lane
Дата:
Robert Haas <robertmhaas@gmail.com> writes:
> Well, we don't seem to really have consensus around anything in
> particular here.  Should we just leave it alone, or is this worth
> spending more effort on?

I haven't seen any suggestions yet that don't seem inferior to the
existing command name (ie, VALIDATE).  I'm inclined to leave it alone.
Your recent hack on CREATE ROLE bought more than changing this would.
        regards, tom lane