Re: some grammar refactoring

2020-06-13 Thread Peter Eisentraut
On 2020-05-19 08:43, Peter Eisentraut 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. These patches have been committed. -- Peter Eisentraut http://www.2ndQuadrant.com/ Po

Re: some grammar refactoring

2020-05-26 Thread Tom Lane
Robert Haas writes: > On Tue, May 26, 2020 at 4:28 AM Peter Eisentraut > wrote: >> Most utility commands don't have an intermediate parse analysis pass. >> They just go straight from the grammar to the execution. Maybe that >> could be rethought, but that's the way it is now. > I think it can a

Re: some grammar refactoring

2020-05-26 Thread Robert Haas
On Tue, May 26, 2020 at 4:28 AM Peter Eisentraut wrote: > On 2020-05-25 21:09, Mark Dilger wrote: > > I don't think it moves the needle too much, either. But since your patch > > is entirely a refactoring patch and not a feature patch, I thought it would > > be fair to ask larger questions abou

Re: some grammar refactoring

2020-05-26 Thread Peter Eisentraut
On 2020-05-25 21:09, Mark Dilger wrote: I don't think it moves the needle too much, either. But since your patch is entirely a refactoring patch and not a feature patch, I thought it would be fair to ask larger questions about how the code should be structured. I like using enums and switch

Re: some grammar refactoring

2020-05-25 Thread Mark Dilger
> On May 25, 2020, at 2:55 AM, Peter Eisentraut > wrote: > > On 2020-05-22 18:53, Mark Dilger wrote: >> I like the general direction you are going with this, but the decision in >> v1-0006 to move the error for invalid object types out of gram.y and into >> extension.c raises an organizatio

Re: some grammar refactoring

2020-05-25 Thread Peter Eisentraut
On 2020-05-22 18:53, Mark Dilger wrote: I like the general direction you are going with this, but the decision in v1-0006 to move the error for invalid object types out of gram.y and into extension.c raises an organizational question. At some places in gram.y, there is C code that checks par

Re: some grammar refactoring

2020-05-22 Thread Mark Dilger
> On May 18, 2020, at 11:43 PM, Peter Eisentraut > 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

Re: some grammar refactoring

2020-05-22 Thread Peter Eisentraut
On 2020-05-19 08:43, Peter Eisentraut 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 a

Re: some grammar refactoring

2020-05-21 Thread Rushabh Lathia
On Tue, May 19, 2020 at 12:13 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.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 excep

Re: some grammar refactoring

2020-05-19 Thread Robert Haas
On Tue, May 19, 2020 at 2:43 AM Peter Eisentraut 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 refere

some grammar refactoring

2020-05-18 Thread Peter Eisentraut
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 tha