Re: [HACKERS] make more use of RoleSpec struct - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] make more use of RoleSpec struct
Date
Msg-id 20161228153356.hmkxhuhzjepilzeo@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] make more use of RoleSpec struct  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [HACKERS] make more use of RoleSpec struct  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost wrote:
> * Alvaro Herrera (alvherre@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
> > compile-time warning.  Perhaps it's worth adding IsA() checks in loops
> > such as the one in roleSpecsToIds().
> 
> Maybe inside of an Assert() though..?

Yeah, I was of two minds when writing that para.  Maybe roleSpecsToIds
(and all similar functions, if any others exist) has a limited enough
caller base that it's trivial to audit that no bogus callsite exists.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Reporting planning time with EXPLAIN
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Reporting planning time with EXPLAIN