Re: Fix ISSN output truncation when the issue code is nonzero

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Jonah Shafran <jonahshafran(at)gmail(dot)com>
Subject: Re: Fix ISSN output truncation when the issue code is nonzero
Date: 2026-11-19 07:12:56
Message-ID: 5fbda957-edad-4a08-a3f7-55d2d2e55e13@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Chao

On 19/11/2026 01:24, Chao Li wrote:
> While debugging this patch, I noticed that the input isn has already been hyphenated, and ean2ISSN() is a local static function that is only called by ean2string(). Actually, your new logic of returning directly relies on isn being hyphenated. So I don't think we need to dehyphenate isn. Instead, we can just compare:
> ```
> if (strncmp(isn + 13, "00", 2) != 0)
> return;
> ```

Good catch! dehyphenate is indeed superfluous here.
v2 attached removes the function call and the digits buffer.

Thanks!

Best, Jim

Attachment Content-Type Size
v2-0001-Fix-ISSN-output-truncation-when-the-issue-code-is.patch text/x-patch 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-11-19 07:14:21 Re: BUG #19776: pg_combinebackup ignores the truncation_block_length of an intermediate incremental backup
Previous Message Kyotaro Horiguchi 2026-11-19 07:00:46 Re: [PATCH] Reject empty string in option_parse_int()