Re: allowing broader use of simplehash

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: allowing broader use of simplehash
Date: 2019-12-15 03:24:35
Message-ID: CA+TgmoaipKp_tL0CtP6=eGcr+qdZLNy99HZNOg0SuE=5h6UYOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 12, 2019 at 2:33 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> I was basically just thinking that we could pass the context to use via
> CurrentMemoryContext, instead of explicitly passing it in.

I thought about that, but as a general rule, replacing a function
parameter with a global variable is the wrong direction. One could
argue this particular case is a counterexample, and I won't fight
tooth and nail if you want to take that position, but I don't think I
believe it myself.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-12-15 03:38:49 Re: more backtraces
Previous Message Robert Haas 2019-12-15 03:21:08 Re: Wrong assert in TransactionGroupUpdateXidStatus