Re: Is custom MemoryContext prohibited?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Kohei KaiGai <kaigai(at)heterodb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is custom MemoryContext prohibited?
Date: 2020-02-05 15:59:32
Message-ID: 4953.1580918372@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> I'm pretty unimpressed with the enum proposal - I think it's pretty
> nasty for an extension author to have to make up a value that's not in
> the enum. One, how are they supposed to know that they should do that?
> Two, how are they supposed to know that the code doesn't actually
> depend on that enum value for anything important? And three, how do
> they know that the compiler isn't going to hose them by assuming that
> isn't a can't-happen scenario?

Well, as I mentioned, the enum field will be pretty much write-only from
the code's standpoint, so that last point is not as killer as you might
think. The rest of this is just documentation, and any of the proposals
on the table require documentation if you expect people to be able to
write extensions to use them.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-02-05 16:03:55 Re: Is custom MemoryContext prohibited?
Previous Message Tom Lane 2020-02-05 15:56:42 Re: Is custom MemoryContext prohibited?