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-05 11:59:03 |
Message-ID: | CAFBsxsGpkmO46nHKqwvK_i8eML1VSZg-r-3HiZ8xd8iSkD12rw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 5, 2020 at 4:24 AM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> 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.
>
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. If not, I'd be curious to know what the difference is. I was
thinking this is just a random style difference, and if so, they should be
the same now that they're in the same file together:
#define BKI_ROWTYPE_OID(oid,oidmacro)
#define DECLARE_TOAST(name,toastoid,indexoid)
And yes, this doesn't materially change the patch, it's just nitpicking :-)
. Materially, I believe it's fine.
--
John Naylor
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-11-05 12:12:53 | Re: Move OpenSSL random under USE_OPENSSL_RANDOM |
Previous Message | Bharath Rupireddy | 2020-11-05 11:03:29 | Re: Multi Inserts in CREATE TABLE AS - revived patch |