Обсуждение: Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

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

Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

От
Thomas Lockhart
Дата:
>     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


Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

От
wieck@debis.com (Jan Wieck)
Дата:

			
		

Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

От
Thomas Lockhart
Дата:
>     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


Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

От
wieck@debis.com (Jan Wieck)
Дата:

			
		

Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

От
Thomas Lockhart
Дата:
> > >       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


Re: RI and PARSER (was: Re: [HACKERS] RI status report #1)

От
wieck@debis.com (Jan Wieck)
Дата: