Re: [HACKERS] patch: change magic constants to DEFINE value for readability.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: CharSyam <charsyam(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] patch: change magic constants to DEFINE value for readability.
Date: 2023-11-25 03:36:55
Message-ID: ZWFr188F34d8M7g6@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 23, 2015 at 11:40:36AM +0900, CharSyam wrote:
> in src/backend/utils/misc/tzparser.c
>
> It uses 60 * 60 to represent SECS_PER_HOUR.
>
> and It is already define in other files.
>
> so I think using SECS_PER_HOUR is more clear for readability.
>
> and I attached patch.(it just change 60 * 60 to SECS_PER_HOUR)
>
> What do you think?

Yes, this patch is nine years old, but macros are better, as you
suggested, so patch applied to master.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2023-11-25 07:09:14 Re: autovectorize page checksum code included elsewhere
Previous Message Julien Rouhaud 2023-11-25 03:04:15 Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements