Re: Move catalog toast table and index declarations

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Move catalog toast table and index declarations
Date: 2020-11-05 08:24:08
Message-ID: bf17d296-1799-ccb1-59c4-284dfb382255@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-10-27 13:12, John Naylor wrote:
> There's nothing wrong; it's just a minor point of consistency. For the
> first part, I mean defined symbols in this file that are invisible to
> the C compiler are written
>
> #define SOMETHING()
>
> If some are written
>
> #define SOMETHING() extern int no_such_variable
>
> I imagine some future reader will wonder why there's a difference.

The difference is that CATALOG() is followed in actual use by something like

{ ... } FormData_pg_attribute;

so it becomes a valid C statement. For DECLARE_INDEX() etc., we need to
do something else to make it valid. I guess this could be explained in
more detail (as I'm attempting in this email), but this isn't materially
changed by this patch.

--
Peter Eisentraut http://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 Kyotaro Horiguchi 2020-11-05 08:29:39 Re: [Patch] Optimize dropping of relation buffers using dlist
Previous Message Kyotaro Horiguchi 2020-11-05 07:26:55 Re: Protect syscache from bloating with negative cache entries