| From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: commented out code |
| Date: | 2026-01-20 11:31:22 |
| Message-ID: | CAEZATCX3SP0bjbkSurf6mkSJ8nGDPcv2+PfYvxNV9zdE4DCkeQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 20 Jan 2026 at 08:49, Peter Eisentraut <peter(at)eisentraut(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Akshay Joshi | 2026-01-20 11:36:53 | Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement |
| Previous Message | Peter Eisentraut | 2026-01-20 11:16:31 | enable fallthrough warnings on clang |