Re: commented out code

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: commented out code
Date: 2026-01-21 04:18:54
Message-ID: CAExHW5v3RVV1qxaupOMnqUL345OgBdBNj-311x9pg_rofB6b2A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 21, 2026 at 12:25 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> > 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.
>
> I think "#ifdef NOT_USED" is our more common style. +1 other than
> that nitpick.

This resonates with your reply 20 years ago [1]. I would have
preferred to be more specific and say NOT_USED_ARGUMENTS to start with
but something that old is hard to change.

[1] https://www.postgresql.org/message-id/14879.1119968227%40sss.pgh.pa.us

--
Best Wishes,
Ashutosh Bapat

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuro Yamada 2026-01-21 04:40:31 Re: [PATCH] psql: add \dcs to list all constraints
Previous Message Chao Li 2026-01-21 03:55:27 tablecmds: reject CLUSTER ON for partitioned tables earlier