Re: Let's start using setenv()

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-12-29T16:45:03Z
Lists: pgsql-hackers

Attachments

Since the cfbot seems happy with v1, here's a v2 that runs around
and converts all putenv() uses to setenv().  In some places there's
no notational savings, but it seems to me that standardizing
on just one way to do it is beneficial.

I'm not sure if there would be any value in revising win32env.c to
treat setenv, rather than putenv, as the primary use-case (and
switching to some corresponding Windows call instead of _putenv).
Perhaps some Windows hacker would be interested in considering that.
For myself, I'm happy with this version as it stands.

			regards, tom lane

Commits

  1. Use setenv() in preference to putenv().