Re: [HACKERS] make more use of RoleSpec struct

2016-12-29 Thread Peter Eisentraut
On 12/28/16 9:53 AM, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> Here is a small cleanup patch to make more use of the RoleSpec >> struct/node throughout the parser to avoid casts and make the code more >> self-documenting. > > This makes sense to me. I started to do this at some point whe

Re: [HACKERS] make more use of RoleSpec struct

2016-12-28 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Stephen Frost wrote: > > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > > > The only functional issue might be the removal of the IsA() checks. If > > > we don't cast any Node before passing it to any of those functions, > > > there sho

Re: [HACKERS] make more use of RoleSpec struct

2016-12-28 Thread Alvaro Herrera
Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > The only functional issue might be the removal of the IsA() checks. If > > we don't cast any Node before passing it to any of those functions, > > there should be no problem because any misfeasance will be reported as a

Re: [HACKERS] make more use of RoleSpec struct

2016-12-28 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Peter Eisentraut wrote: > > Here is a small cleanup patch to make more use of the RoleSpec > > struct/node throughout the parser to avoid casts and make the code more > > self-documenting. > > This makes sense to me. I started to do this at som

Re: [HACKERS] make more use of RoleSpec struct

2016-12-28 Thread Alvaro Herrera
Peter Eisentraut wrote: > Here is a small cleanup patch to make more use of the RoleSpec > struct/node throughout the parser to avoid casts and make the code more > self-documenting. This makes sense to me. I started to do this at some point when I was writing RoleSpec; eventually got annoyed abo