Re: [PATCH] Do not use StdRdOptions in Access Methods

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Nikolay Shaplov <dhyan(at)nataraj(dot)su>, Dent John <denty(at)qqdd(dot)eu>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Iwata, Aya" <iwata(dot)aya(at)jp(dot)fujitsu(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Subject: Re: [PATCH] Do not use StdRdOptions in Access Methods
Date: 2019-11-12 21:55:46
Message-ID: 20191112215546.GA772@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Nov-07, Amit Langote wrote:

> On Tue, Nov 5, 2019 at 9:22 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> > Please note that I have not switched the old interface
> > to be static to reloptions.c as if you look closely at reloptions.h we
> > allow much more flexibility around HANDLE_INT_RELOPTION to fill and
> > parse the reloptions in custom AM. AM maintainers had better use the
> > new interface, but there could be a point for more customized error
> > messages.
>
> I looked around but don't understand why these macros need to be
> exposed. I read this comment:
>
> * Note that this is more or less the same that fillRelOptions does, so only
> * use this if you need to do something non-standard within some option's
> * code block.
>
> but don't see how an AM author might be able to do something
> non-standard with this interface.
>
> Maybe Alvaro knows this better.

I think the idea was that you could have external code doing things in a
different way for some reason, ie. not use a bytea varlena struct that
could be filled by fillRelOptions but instead ... do something else.
That's why those macros are exposed. Now, this idea doesn't seem to be
aged very well. Maybe exposing that stuff is unnecessary.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-11-12 22:11:40 Re: make pg_attribute_noreturn() work for msvc?
Previous Message Alvaro Herrera 2019-11-12 21:50:08 Re: auxiliary processes in pg_stat_ssl