Re: commented out code - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: commented out code
Date
Msg-id CAEZATCX3SP0bjbkSurf6mkSJ8nGDPcv2+PfYvxNV9zdE4DCkeQ@mail.gmail.com
Whole thread Raw
In response to Re: commented out code  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On Tue, 20 Jan 2026 at 08:49, Peter Eisentraut <peter@eisentraut.org> wrote:
>
> On 05.12.25 17:38, Heikki Linnakangas wrote:
> > #if 0
> >      Oid      subtype = PG_GETARG_OID(3);
> > #endif
> >
> > is yet another option. It keeps the indentation, although you won't get
> > the compiler checking.
>
> After some reflection, I like this approach.  It keeps the indentation
> and enables syntax highlighting, so it makes some of these blocks much
> easier to read.

Quite a few other places use this pattern:

#ifdef NOT_USED
    Oid      subtype = PG_GETARG_OID(3);
#endif

Nothing #define's NOT_USED, so it works the same, but helps document
that the argument isn't used.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: enable fallthrough warnings on clang
Next
From: Akshay Joshi
Date:
Subject: Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement