pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Move catalog toast table and index declarations
Date: Thu, 5 Nov 2020 19:20:06 +0100
Message-ID: <281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com> (raw)
In-Reply-To: <CAFBsxsGpkmO46nHKqwvK_i8eML1VSZg-r-3HiZ8xd8iSkD12rw@mail.gmail.com>
References: <c7cc82d6-f976-75d6-2e3e-b03d2cab26bb@2ndquadrant.com>
	<CAFBsxsEDVn28qa=f9Q_q6WOhtpDudUrKZEcD=1YXaseALnyNWA@mail.gmail.com>
	<1983ae60-5fde-8393-029d-ce016d5fce78@2ndquadrant.com>
	<CAFBsxsEdkVnuXeSGrGMU3MP=mHdF00AtJJrAwYD_oQW8TVRnQQ@mail.gmail.com>
	<bf17d296-1799-ccb1-59c4-284dfb382255@2ndquadrant.com>
	<CAFBsxsGpkmO46nHKqwvK_i8eML1VSZg-r-3HiZ8xd8iSkD12rw@mail.gmail.com>

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.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (9+ messages)  latest in thread

Message-ID: <281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com>
Permalink:  ../281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com/
Also on:    postgresql.org/message-id/281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, john.naylor@enterprisedb.com
  Subject: Re: Move catalog toast table and index declarations
  In-Reply-To: <281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com>
  References: <c7cc82d6-f976-75d6-2e3e-b03d2cab26bb@2ndquadrant.com> <CAFBsxsEDVn28qa=f9Q_q6WOhtpDudUrKZEcD=1YXaseALnyNWA@mail.gmail.com> <1983ae60-5fde-8393-029d-ce016d5fce78@2ndquadrant.com> <CAFBsxsEdkVnuXeSGrGMU3MP=mHdF00AtJJrAwYD_oQW8TVRnQQ@mail.gmail.com> <bf17d296-1799-ccb1-59c4-284dfb382255@2ndquadrant.com> <CAFBsxsGpkmO46nHKqwvK_i8eML1VSZg-r-3HiZ8xd8iSkD12rw@mail.gmail.com> <281df85e-5667-57b0-a5e8-88bfc455c14d@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox