Re: Tweaking ResolveNew's API - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Tweaking ResolveNew's API
Date
Msg-id 20121108193154.GF7225@alvh.no-ip.org
Whole thread Raw
In response to Tweaking ResolveNew's API  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Tweaking ResolveNew's API  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> A possible objection to this is that most C compilers wouldn't complain
> if a call site is still trying to use the old convention of passing a
> CmdType value.  In the core code, there are only four call sites and
> three are in rewriteHandler.c itself, so this isn't much of a problem
> --- but if there's any third-party code such as FDWs that's trying to
> make use of this function for querytree manipulation, there'd be a risk
> of failing to notice the need to update the call.

Failing to notice such changes is easy if the compiler doesn't even
issue a warning, so *some* way to have old code fail (even better if
it's a hard error and not just a warning) would be nice.  I'm not sure I
have useful suggestions on how to do it, though, just a +1 to doing it.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proof of concept: auto updatable views [Review of Patch]
Next
From: Tom Lane
Date:
Subject: Re: Tweaking ResolveNew's API