>     To  coordinate  with your work I've included my needs for the
>     SET CONSTRAINTS command below. I can wait a little  with  the
>     other  (CREATE  CONTRAINT TRIGGER) until you're done - except
>     you need to lock the parser for loooong time.

I didn't look *carefully*, but I'm sure this is all just fine. If you
have a chance, could you please try adding every new keyword to the
existing alphabetical list in ColId and/or ColLabel? In many cases
keywords which appear in only a limited context can still be allowed
in other places, and when we add new ones we tend to forget to update
this list.

I can do this later if you like; send me a note to remind me after you
commit your changes.

btw, since I'd already done some work on gram.y for join syntax the
patches to get it right aren't all that invasive in that file.

                    - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Tue, 28 Sep 1999 14:11:04 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)
Thomas Lockhart wrote:

> >     To  coordinate  with your work I've included my needs for the
> >     SET CONSTRAINTS command below. I can wait a little  with  the
> >     other  (CREATE  CONTRAINT TRIGGER) until you're done - except
> >     you need to lock the parser for loooong time.
>
> I didn't look *carefully*, but I'm sure this is all just fine. If you
> have a chance, could you please try adding every new keyword to the
> existing alphabetical list in ColId and/or ColLabel? In many cases
> keywords which appear in only a limited context can still be allowed
> in other places, and when we add new ones we tend to forget to update
> this list.

    Just   tell  me  which  of  these  SQL3  "reserved"  keywords
    (according to the SQL3 draft I  got  from  Vadim)  should  be
    available for column ID or Label:

      CONSTRAINTS
      DEFERRABLE
      DEFERRED
      IMMEDIATE
      INITIALLY
      PENDANT
      RESTRICT

    Then  I'll add them before committing. Overlooking the syntax
    of my new commands, it wouldn't hurt to add them all to these
    lists. But should SQL3 reserved words really be in them?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #



Tue, 28 Sep 1999 19:58:09 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)
>     Just   tell  me  which  of  these  SQL3  "reserved"  keywords
>     (according to the SQL3 draft I  got  from  Vadim)  should  be
>     available for column ID or Label:
>       CONSTRAINTS
>       DEFERRABLE
>       DEFERRED
>       IMMEDIATE
>       INITIALLY
>       PENDANT
>       RESTRICT
>     Then  I'll add them before committing. Overlooking the syntax
>     of my new commands, it wouldn't hurt to add them all to these
>     lists. But should SQL3 reserved words really be in them?

We have tried to allow as many keywords as possible for identifiers
(for ColId, which includes ColLabel) or, as a more limited choice, for
column aliases (ColLabel only). This is particularly helpful as we
implement more and more of the standard, and take away previously
allowed column and table names. The keywords, reserved, unreserved,
and unused, are documented for Postgres in syntax.sgml, and the docs
present them wrt the SQL92 and SQL3 standards.

What I usually do is try adding one or all of them to ColId, and if
that fails by giving shift/reduce conflicts I'll try moving the
offenders to ColLabel. There aren't many places in the syntax where
yacc/bison can't handle keywords at least as column labels.

                      - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Wed, 29 Sep 1999 04:41:26 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)
> >       CONSTRAINTS
> >       DEFERRABLE
> >       DEFERRED
> >       IMMEDIATE
> >       INITIALLY
> >       PENDANT
> >       RESTRICT
>
> [...]
> allowed column and table names. The keywords, reserved, unreserved,
> and unused, are documented for Postgres in syntax.sgml, and the docs
> present them wrt the SQL92 and SQL3 standards.
>
> What I usually do is try adding one or all of them to ColId, and if
> that fails by giving shift/reduce conflicts I'll try moving the
> offenders to ColLabel. There aren't many places in the syntax where
> yacc/bison can't handle keywords at least as column labels.

    O.K.  - I was able to add them all to ColId without conflicts
    for now.  Let's see what happens after adding the syntax  for
    CREATE CONSTRAINT TRIGGER.

    I'm  not  sure which of them are SQL92 or SQL3, at least they
    are all SQL3 "reserved" words according to the SQL3 draft.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #



Wed, 29 Sep 1999 11:13:04 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)
> > >       CONSTRAINTS
> > >       DEFERRABLE
> > >       DEFERRED
> > >       IMMEDIATE
> > >       INITIALLY
> > >       PENDANT
> > >       RESTRICT
>     O.K.  - I was able to add them all to ColId without conflicts
>     for now.  Let's see what happens after adding the syntax  for
>     CREATE CONSTRAINT TRIGGER.

Right. Anything which causes trouble can be demoted to ColLabel.

>     I'm  not  sure which of them are SQL92 or SQL3, at least they
>     are all SQL3 "reserved" words according to the SQL3 draft.

According to my Date and Darwen (which is mostly SQL92), all of these
except "PENDANT" are SQL92 reserved words. PENDANT is not mentioned,
so is presumably an SQL3-ism.

Do you want me to update syntax.sgml?

                    - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Wed, 29 Sep 1999 13:10:29 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)
Thomas Lockhart wrote:

>
> > > >       CONSTRAINTS
> > > >       DEFERRABLE
> > > >       DEFERRED
> > > >       IMMEDIATE
> > > >       INITIALLY
> > > >       PENDANT
> > > >       RESTRICT
> >     O.K.  - I was able to add them all to ColId without conflicts
> >     for now.  Let's see what happens after adding the syntax  for
> >     CREATE CONSTRAINT TRIGGER.
>
> Right. Anything which causes trouble can be demoted to ColLabel.
>
> >     I'm  not  sure which of them are SQL92 or SQL3, at least they
> >     are all SQL3 "reserved" words according to the SQL3 draft.
>
> According to my Date and Darwen (which is mostly SQL92), all of these
> except "PENDANT" are SQL92 reserved words. PENDANT is not mentioned,
> so is presumably an SQL3-ism.
>
> Do you want me to update syntax.sgml?

    Please  be so kind. CREATE CONSTRAINT TRIGGER did not mess up
    anything, so all these new reserved words appear in ColId and
    are still available.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #



Wed, 29 Sep 1999 16:03:05 +0200 (MET DST)
wieck@debis.com (Jan Wieck)
Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)