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

From Tom Lane
Subject Re: Is custom MemoryContext prohibited?
Date
Msg-id 4953.1580918372@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is custom MemoryContext prohibited?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is custom MemoryContext prohibited?
Next
From: Tom Lane
Date:
Subject: Re: Is custom MemoryContext prohibited?