Re: Move catalog toast table and index declarations

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Move catalog toast table and index declarations
Date: 2020-11-06 13:00:52
Message-ID: CAFBsxsGLWB-BGP9fdTn1E6i1jB2pSvN4RkWoFdQ7LScAMqDATg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 5, 2020 at 2:20 PM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> On 2020-11-05 12:59, John Naylor wrote:
> > I think we're talking past eachother. Here's a concrete example:
> >
> > #define BKI_ROWTYPE_OID(oid,oidmacro)
> > #define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable
> >
> > I understand these to be functionally equivalent as far as what the C
> > compiler sees.
>
> The issue is that you can't have a bare semicolon at the top level of a
> C compilation unit, at least on some compilers. So doing
>
> #define FOO(stuff) /*empty*/
>
> and then
>
> FOO(123);
>
> won't work. You need to fill the definition of FOO with some stuff to
> make it valid.
>
> BKI_ROWTYPE_OID on the other hand is not used at the top level like
> this, so it can be defined to empty.
>

Thank you for the explanation.

--
John Naylor
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2020-11-06 13:05:43 Re: Any objections to implementing LogicalDecodeMessageCB for pgoutput?
Previous Message Sergei Kornilov 2020-11-06 12:36:48 Re: Allow some recovery parameters to be changed with reload