Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVvUF-009mQ2-1O for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 17:38:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVvUE-00FHT1-0Y for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 17:38:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVvUD-00FHSs-2k for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 17:38:54 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVvUC-001Go0-0Z for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 17:38:54 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-78a712cfbc0so65170597b3.1 for ; Wed, 17 Dec 2025 09:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765993130; x=1766597930; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BqEmap6QszKHkLUTIOMvQBhc6qYGaLwP2i7F6va/7LU=; b=fPI2u9Smhv5+646GxmYyfx4fk8trsx5OEjOAYabIurBIy0y91VytUnhmkbyYW7kD4/ s60b4gsmioNVg/3RxHa7i0DZ7be8xsY/MbALxkaIao2mUpAPl42r72iDoLEnPWxbrYxO 4hCxbcXzdzF2QKm93xF/d70Y77PEPgMK/XrgdPqvir5pbZtq/PDCaswVTefvyVpvPhpU Ctkout8uwVj9QJyZgC0BIwsStLrsErckPO6E5bgY+jOKErVRdaPq0G5go8cmS5k+WjAC YBwrVAZ0jeQlUe04kjNOn3znZzYgUC8V4xTLi23OCvviyz1DMqxdr+vwSppuVxnvV9lk Vy0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765993130; x=1766597930; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BqEmap6QszKHkLUTIOMvQBhc6qYGaLwP2i7F6va/7LU=; b=tI3LyQtBIL1iCh8jf9oPHozcIeXpemz7aeVH5F27yRtvx0jbJt+xVd1MtbG0xRayHs iphwYsrQfcWQiJ0SE7XvRe7RJJDb96O+kSXK1QTSGVCjmiwHt8SDza6o1HhtN0vCkbON FfizBUGJySyLPA292B4OzEBmaRUx5eUZI4+yNQ+JKaJk/VZ1KN0fhBovl181wZbEm+oS f/09utVDC1d6klFfGljXLJaxllT0HK+UVK8k6HqhvCCuglfHQJ15DqPB/pj1foQJEYBv ub4TZ/8jLsMLaZejPYfzWEcexF9KVUc18x39vxCXb8TzfOS7bJl6oJ8EJpQHtdjtuL0C qniQ== X-Forwarded-Encrypted: i=1; AJvYcCW4pgBj1CJsU+z+m1u45s9axwHVHfnaSNB4zurBpQ3V7ZsnOEyCW0baDMek59F1GUWztE91P3S8nmf48bJC@lists.postgresql.org X-Gm-Message-State: AOJu0Yx+S3kO8/cHOlN4OmRPVpnEnhPCTMq1hMdXYFZ7k+NRlFxKlp1B 1lyXWpXXjC9CV96BtVxyJfOWMCCNu3KpRKqy0LZDXQEBUXMF/UlZO64oSKE/Ok4/WZnv1Z+j3Bv kNdYjXE3B88bTd8T1FFByuTuB+4J96EE= X-Gm-Gg: AY/fxX54oAfnz4ghWF+SUSURQtpvvQYVp8BANrwUcDW2DvSl1ONz8LG1G1GhbIg8gVF h8EIvGH4FP4U67tHSkpkGaJego9BGzasvmpjB6o0YzyPFc6WzB5bNO3kaa4s4WCqViUI0m//1O/ BmH5sy9ZcJJV+Fze7nNyOhOIw2XaLezZIg8uA/GE1t2CeA9IvJnzKp49XPr0EAwvBSqaH4W6bHi ljDBD9HIA05KT0y+9q2B40wX4u8KU8KwyxOn1myZ8OpUQjOmo2jAdXx/a41dpsqewQU1yzv6Xbs zrrcLcLXrzInK9ooN1m58O9Z5A== X-Google-Smtp-Source: AGHT+IGctF7W9mTPNqYJ8wNjWV6IVMsfZTRyXcR2EGb7C7HYxCC3OrgMICVbNI9QddRLX2fWYEHEtg8TCacGo/LUrQE= X-Received: by 2002:a05:690c:4b83:b0:787:d0bc:e82c with SMTP id 00721157ae682-78e66e9690amr154288287b3.59.1765993129979; Wed, 17 Dec 2025 09:38:49 -0800 (PST) MIME-Version: 1.0 References: <2547700.1765940917@sss.pgh.pa.us> <9a0ce31a49f149d8d982d2b359095560655f781e.camel@cybertec.at> In-Reply-To: <9a0ce31a49f149d8d982d2b359095560655f781e.camel@cybertec.at> From: Igor Korot Date: Wed, 17 Dec 2025 09:38:38 -0800 X-Gm-Features: AQt7F2pMRIO6p-_LlimOJ4L_4mw3LwucX2P5bJ2yGiVJl75MpfK852A3B9hA6_4 Message-ID: Subject: Re: PQexecPrepared() question To: Laurenz Albe Cc: Tom Lane , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000030345d064629510a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000030345d064629510a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you. On Tue, Dec 16, 2025 at 11:32=E2=80=AFPM Laurenz Albe 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. > > 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=3Dauto", by the encoding set in > the client's environment > > - by setting the PGCLIENTENCODING environment variable > > Yours, > Laurenz Albe > --00000000000030345d064629510a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you.


On Tue, Dec 16, 2025 at 11:32=E2=80=AFPM Laurenz Albe <laurenz.albe@cybertec.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 configurati= on.

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=3Dauto", by the encoding set= in
=C2=A0 the client's environment

- by setting the PGCLIENTENCODING environment variable

Yours,
Laurenz Albe
--00000000000030345d064629510a--