public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: BUG #19410: Cannot ser client_encoding
Date: Sun, 15 Feb 2026 10:10:33 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwYYWsCTBBah+4OSLHOX7vjrS8o2K4DxhEzbuMbSp5KAqQ@mail.gmail.com>
References: <[email protected]>
	<CAKFQuwYYWsCTBBah+4OSLHOX7vjrS8o2K4DxhEzbuMbSp5KAqQ@mail.gmail.com>

"David G. Johnston" <[email protected]> writes:
> On Saturday, February 14, 2026, PG Bug reporting form <
> [email protected]> wrote:
>> [ SET doesn't persist across sessions ]

> Everything you’ve shown worked as expected.

Indeed.  I suggest reading

https://www.postgresql.org/docs/current/config-setting.html

which not only explains that the effects of SET are per-session,
but lists all the other ways to adjust a server setting.

> If you want to always use UTF-8 I’d suggest you figure out how to configure
> your client to do so.  psql will then just auto-detect whatever is actually
> in use.  It doesn’t really make sense to use SET with client_encoding.

Yeah, that's an orthogonal issue: you really need client_encoding to
match whatever your terminal window is using, or non-ASCII characters
won't display correctly.  So letting psql deduce it from environment
is usually the right thing.

			regards, tom lane






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: BUG #19410: Cannot ser client_encoding
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox