From: | Greg Stark <greg(dot)stark(at)enterprisedb(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Keyword list sanity check |
Date: | 2009-04-28 08:49:12 |
Message-ID: | B0AFE698-5AC7-4013-8C61-735602608EA7@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I had previously considered adding an assertion in the backend to
check they're sorted properly. That would be less formatting dependent
and would be only a couple lines of C.
I don't think we can do that with the gram.y check though.
--
Greg
On 28 Apr 2009, at 09:33, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com
> wrote:
> I wrote a little perl script to perform a basic sanity check to
> keywords in gram.y and kwlist.h. It checks that all lists are in
> alphabetical order, all keywords present in gram.y are listed in
> kwlist.h in the right category, and conversely that all keywords
> listed in kwlist.h are listed in gram.y.
>
> It found one minor issue already:
>
> $ perl src/tools/check_keywords.pl
> 'SCHEMA' after 'SERVER' in unreserved_keyword list is misplaced
>
> SERVER is not in the right place in gram.y, it should go between
> SERIALIZABLE and SERVER. I'll fix that.
>
> I'll put this into src/tools. It's heavily dependent on the format
> of the lists in gram.y and kwlist.h but if it bitrots due to changes
> in those files, we can either fix it or just remove it if it's not
> deemed useful anymore.
>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com
> <check_keywords.pl>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-04-28 08:57:19 | Re: Keyword list sanity check |
Previous Message | Heikki Linnakangas | 2009-04-28 08:33:28 | Keyword list sanity check |