Re: PQexecPrepared() question

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: PQexecPrepared() question
Date: 2025-12-18 15:20:12
Message-ID: CA+FnnTzE34VJWR7xkymaKEwXiiQ8j3o03m0+qcQsRr2JkRQLwQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Tue, Dec 16, 2025 at 11:32 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> On Tue, 2025-12-16 at 21:53 -0800, Igor Korot wrote:
> > Is there some default value for client_encoding?
>
> The default value for a client connection is whatever the parameter
> "client_encoding" was set to in the PostgreSQL server configuration.

Imagine following scenario:

I have 2 machines. One is running PG server on *nix. Second is my app on
Windows.

An application starts for the first time.

What is “clientencoding in this case?

Thank you.

>
> But that value can be overridden in several ways:
>
> - explicitly by setting "client_encoding" in the connect string
>
> - with the SQL statement SET by the client
>
> - if the client has "client_encoding=auto", by the encoding set in
> the client's environment
>
> - by setting the PGCLIENTENCODING environment variable
>
> Yours,
> Laurenz Albe
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2025-12-18 15:40:31 Re: PQexecPrepared() question
Previous Message Kris Deugau 2025-12-18 15:03:06 Re: Record last SELECT on a row?