Hard to maintain duplication in contain_volatile_functions_not_nextval_walker - Mailing list pgsql-hackers

From Andres Freund
Subject Hard to maintain duplication in contain_volatile_functions_not_nextval_walker
Date
Msg-id 20160527185853.ziol2os2zskahl7v@alap3.anarazel.de
Whole thread Raw
Responses Re: Hard to maintain duplication in contain_volatile_functions_not_nextval_walker  (Amit Kapila <amit.kapila16@gmail.com>)
Re: Hard to maintain duplication in contain_volatile_functions_not_nextval_walker  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

contain_volatile_functions_walker is duplicated, near entirely, in
contain_volatile_functions_not_nextval_walker.

Wouldn't it have been better not to duplicate, and keep a flag about
ignoring nextval in the context variable?

While at it, couldn't we also fold contain_mutable_functions_walker()
together using a similar technique?

Regards,

Andres



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Allow COPY to use parameters
Next
From: Alvaro Herrera
Date:
Subject: Re: [PROPOSAL] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind