pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
Subject: Hard to maintain duplication in contain_volatile_functions_not_nextval_walker
Date: Fri, 27 May 2016 11:58:53 -0700
Message-ID: <20160527185853.ziol2os2zskahl7v@alap3.anarazel.de> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (5+ messages)  latest in thread

Message-ID: <20160527185853.ziol2os2zskahl7v@alap3.anarazel.de>
Permalink:  ../20160527185853.ziol2os2zskahl7v@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160527185853.ziol2os2zskahl7v@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: Hard to maintain duplication in contain_volatile_functions_not_nextval_walker
  In-Reply-To: <20160527185853.ziol2os2zskahl7v@alap3.anarazel.de>
  References: <20160527185853.ziol2os2zskahl7v@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox