Re: Is custom MemoryContext prohibited? - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Is custom MemoryContext prohibited?
Date
Msg-id 14026d51-ad19-c435-f677-40ffa8a952bc@anastigmatix.net
Whole thread Raw
In response to Re: Is custom MemoryContext prohibited?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is custom MemoryContext prohibited?
List pgsql-hackers
On 2/5/20 10:20 AM, Tom Lane wrote:

> * Third-party context types would have to force the compiler to take
> context-type values that weren't among the known enum values ---

Doesn't that seem like a long run for a short slide? An extension
author gets expected to do something awkward-bordering-on-smelly
so that debugging can rely on an enum saying "this is a Foo" rather
than a string saying "this is a Foo"?

Granted, it's possible the extension-authoring situation is rare,
and debugging often happens under time pressure and dire stakes,
so perhaps that would be the right balance for this case. I have
certainly seen emails from Tom in this space with the analysis of
some reported bug completed preternaturally fast, so if he judges
that losing the enum would make that harder, that's something.

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Tom Lane
Date:
Subject: Re: Is custom MemoryContext prohibited?