Re: [HACKERS] make more use of RoleSpec struct

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] make more use of RoleSpec struct
Дата
Msg-id 20161228145358.zi3x26w2hwhsywnc@alvherre.pgsql
обсуждение исходный текст
Ответ на [HACKERS] make more use of RoleSpec struct  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] make more use of RoleSpec struct  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
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 about fixing the fallout (I was
working to get somebody else's patch committed) and went back to how it
is.  Glad to see it done.

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
compile-time warning.  Perhaps it's worth adding IsA() checks in loops
such as the one in roleSpecsToIds().

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] proposal: session server side variables
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal: session server side variables