Re: Reject Windows command lines not convertible to system locale

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reject Windows command lines not convertible to system locale
Date: 2024-12-15 14:44:04
Message-ID: CA+hUKGKXLu=p36gFbaJ7ic+O+eDWw4U8+FqQP=vt7=4MQ=Tn2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 15, 2024 at 6:05 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
> On Sun, Dec 15, 2024 at 04:50:57PM +1300, Thomas Munro wrote:
> > For the all-ASCII test, why not us pg_is_ascii()?
>
> pg_is_ascii() takes a char[], but this has a wchar_t[]. Maybe I should wrap
> that part in a pg_wcs_is_ascii()? (We can't use GetCommandLineA(), because
> "best fit" may have converted non-ASCII to ASCII.)

Right, sorry, brain fade. No issue with the open-coding here if you
want an early exit (I'd be tempted to just not have it for simplicity
but no strong opinion).

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-12-15 15:10:27 Re: Confine vacuum skip logic to lazy_scan_skip
Previous Message Michail Nikolaev 2024-12-15 14:12:55 [BUG] pgbench nested \if conditions incorrectly processed