sulf...@gmail.com wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      5315
> Logged by:          
> Email address:      sulf...@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  <br...@momjian.us>        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 ****
     </row>
     <row>
      <entry><token>OVER</token></entry>
!     <entry></entry>
      <entry>reserved</entry>
      <entry>reserved</entry>
      <entry></entry>
--- 3521,3527 ----
     </row>
     <row>
      <entry><token>OVER</token></entry>
!     <entry>reserved (can be function or type)</entry>
      <entry>reserved</entry>
      <entry>reserved</entry>
      <entry></entry>
***************
*** 5561,5567 ****
     </row>
     <row>
      <entry><token>WINDOW</token></entry>
!     <entry></entry>
      <entry>reserved</entry>
      <entry>reserved</entry>
      <entry></entry>
--- 5561,5567 ----
     </row>
     <row>
      <entry><token>WINDOW</token></entry>
!     <entry>reserved</entry>
      <entry>reserved</entry>
      <entry>reserved</entry>
      <entry></entry>
-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to