From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: some grammar refactoring |
Date: | 2020-05-21 08:49:55 |
Message-ID: | CAGPqQf2eN9cVMeiYhrhHuxTCYcOtPGj-uGsonRn0VUNrzUO+sQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 19, 2020 at 12:13 PM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> Here is a series of patches to do some refactoring in the grammar around
> the commands COMMENT, DROP, SECURITY LABEL, and ALTER EXTENSION ...
> ADD/DROP. In the grammar, these commands (with some exceptions)
> basically just take a reference to an object and later look it up in C
> code. Some of that was already generalized individually for each
> command (drop_type_any_name, drop_type_name, etc.). This patch combines
> it into common lists for all these commands.
>
> Advantages:
>
> - Avoids having to list each object type at least four times.
>
> - Object types not supported by security labels or extensions are now
> explicitly listed and give a proper error message. Previously, this was
> just encoded in the grammar itself and specifying a non-supported object
> type would just give a parse error.
>
> - Reduces lines of code in gram.y.
>
> - Removes some old cruft.
>
>
I liked the idea.
I had quick glance through the patches and also did quick review and
testing.
I haven't found any issue with the patch.
--
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
--
Rushabh Lathia
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2020-05-21 08:50:55 | Re: pg13: xlogreader API adjust |
Previous Message | Tatsuro Yamada | 2020-05-21 08:43:01 | Re: Is it useful to record whether plans are generic or custom? |