BUG #5315: Unlisted keyword WINDOW

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

BUG #5315: Unlisted keyword WINDOW

От:
"" <sulfinu@gmail.com>
Дата:
The following bug has been logged online:

Bug reference:      5315
Logged by:          
Email address:      sulfinu@gmail.com
PostgreSQL version: 8.4.2
Operating system:   Gentoo Linux
Description:        Unlisted keyword WINDOW
Details: 

According to the official documentation
(http://www.postgresql.org/docs/8.4/interactive/sql-keywords-appendix.html),
the SQL reserved keyword WINDOW is totally uninteresting to PostgreSQL.

But in real life the parser has a different opinion. Just try this:
create table a (
window integer,
c varchar(20));

So, either correct the parser (is there any use for the word WINDOW in
Postgres?) or the documentation.

Re: BUG #5315: Unlisted keyword WINDOW

От:
Bruce Momjian <bruce@momjian.us>
Дата:
sulfinu@gmail.com wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      5315
> Logged by:          
> Email address:      sulfinu@gmail.com
> PostgreSQL version: 8.4.2
> Operating system:   Gentoo Linux
> Description:        Unlisted keyword WINDOW
> Details: 
> 
> According to the official documentation
> (http://www.postgresql.org/docs/8.4/interactive/sql-keywords-appendix.html),
> the SQL reserved keyword WINDOW is totally uninteresting to PostgreSQL.
> 
> But in real life the parser has a different opinion. Just try this:
> create table a (
> window integer,
> c varchar(20));
> 
> So, either correct the parser (is there any use for the word WINDOW in
> Postgres?) or the documentation.

Ah, quite interesting.  I grabed all the keywords in our SGML docs
listed as somehow reserved in Postgres, and then ran "SELECT word FROM 
pg_get_keywords() WHERE catcode != 'U'" to get all the keywords from our
C code, and then compared the two.  The two missing keywords were OVER,
and WINDOW, as you mentioned.

I have applied the attached patch to CVS HEAD and 8.4.X to properly
document our keywords.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/keywords.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/keywords.sgml,v
retrieving revision 2.28
diff -c -c -r2.28 keywords.sgml
*** doc/src/sgml/keywords.sgml	23 Dec 2009 17:41:43 -0000	2.28
--- doc/src/sgml/keywords.sgml	5 Feb 2010 19:34:16 -0000
***************
*** 3521,3527 ****
     
     
      OVER
!     
      reserved
      reserved
      
--- 3521,3527 ----
     
     
      OVER
!     reserved (can be function or type)
      reserved
      reserved
      
***************
*** 5561,5567 ****
     
     
      WINDOW
!     
      reserved
      reserved
      
--- 5561,5567 ----
     
     
      WINDOW
!     reserved
      reserved
      reserved
      
FAQ