Re: Thread-safe getopt()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thread-safe getopt()
Date: 2026-03-30 14:54:11
Message-ID: 2008737.1774882451@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> Thread-local variables would work too, but I think we'd need to give
> them different names anyway to avoid conflicting with the plain getopt()
> global variables.

Oh, excellent point. I was thinking the change could be purely local to
getopt.c, but that probably wouldn't work because some of them are in
the visible API.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-03-30 14:56:12 Re: [PATCH] Add support for INSERT ... SET syntax
Previous Message Robert Haas 2026-03-30 14:53:30 Re: pg_plan_advice