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 1vXMlF-008YTU-0Q for pgsql-general@arkaria.postgresql.org; Sun, 21 Dec 2025 16:58:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vXMlC-00C2BL-1b for pgsql-general@arkaria.postgresql.org; Sun, 21 Dec 2025 16:58:23 +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 1vXMlC-00C2BD-0V for pgsql-general@lists.postgresql.org; Sun, 21 Dec 2025 16:58:22 +0000 Received: from mail-yx1-xb132.google.com ([2607:f8b0:4864:20::b132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vXMlA-001w3d-1G for pgsql-general@lists.postgresql.org; Sun, 21 Dec 2025 16:58:22 +0000 Received: by mail-yx1-xb132.google.com with SMTP id 956f58d0204a3-6447743ce90so2884187d50.2 for ; Sun, 21 Dec 2025 08:58:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766336298; x=1766941098; 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=n1VC9iHv3rBk/kdYU0R0nkw3A4TVapIQ3BMl2CDaVjU=; b=WdPIyP9XU0kFEyF8v2OEGPqxgzOzDv4BATPpYO7H56qispqIVeIhNVoSZA30AN0W1V nYk5DahcNGg3ZtD2E//iQgiXH+pgYKGZ5gb643WsUHOcIgOFoELKWvHKDqM+dlvsVd21 wISr3ib//uyslFNbxKgCFaIxMgdDqYaYzgUWHL5l3h3tr6S7hdItdi3r1+WD6LHsZpXu HPc3DdXus11Rr3BjojVNsdyKduCNMZ/56wy8rW7D4mQQIWSpoi3dh7o6YqJrwHkLOvNy mD2BIEpGzvh8hB3Rclcxgn6HGaGQv24gn3sejjzZ3WvsBPDvDz+Qy5tud0AG73HuSl2I TENQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766336298; x=1766941098; 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=n1VC9iHv3rBk/kdYU0R0nkw3A4TVapIQ3BMl2CDaVjU=; b=OziQb+FlfEto8VjRPpXdJDo6po7ZIT6vFMhprCMpde1qXJGKoR67A4lfB1JSa5mP2w zYzJUYUTqGnUN2zAdTg0k6BQ90p9SuPDpdHa6OdR40N50ZkpV0Lq2RvayFcbIkkRyO0Y x2YKL2LMgJIB6vqNT31jxeCQ61aVq5mhNowdlKCY5Ymz2zt9uEOZTinzDwwvKvxRG3RM NqQPyL4gT+2sYTuwTLOX9Nvl5CsrbHdMi9xmlrw/VbL7Mf0kAILIeg1a8lIBsk7eK6RZ OzWZyXQ7akM4D8Wtfz7AxQ+97pFQ5os6BjeXraWD1EXZi1Z3ior+8ORs6I6mlYW73S/0 /Gqg== X-Forwarded-Encrypted: i=1; AJvYcCV/6F7qXuurN3wbRzKbdca0U1Q+6g/FKEOVk2KxkTVzodB495Q96q5w9p6pETUC3BpeJ1oRPyaLy0Zsesjx@lists.postgresql.org X-Gm-Message-State: AOJu0YxEqFhMVsRp+xlH1nkON3p8PhFP3t/gfyAfUk1tT6TVpeeLTIzP 7oUcQjyH4DUzToWSfGaZfOtK3DvsdFDIKwOHNhlQ7qSC+dOF+NJnb+VN1IzRh1zRk0X52hpJBTZ AnqU/bn2+wJ2ozXXr7bacoYJw1imqC2I= X-Gm-Gg: AY/fxX5ttBXDJRmIJd5sPaH1ys0Mlhp6O/kAVh2+pW0i/HdkMAVGQT2rbxVoJzMRwyR R46mgGV4TmTbBne4eldpuoGuR2tFvqBUp7mxJ5evctiniIVoAHycJrPTf4qLDrFc6HT1X5MjV4g 1f4deiD82U+Z1fZcdZYwTxR89Mob+YPGzBB99/i8VoMBAbrngPMDEaJvzM/VqPz6jMYOlmaxcdG JbEQC5953ed6kykxN3Fsw3WLr1g0INYAiPXJxnibCXeRuRND0x/G9cK768PWU/8bscba7fRNAeW wdUSEATwgj/mSk5vTy60A+ePh+cf X-Google-Smtp-Source: AGHT+IE1ukZlpw47m69V6JVHYohNuFpsedIBIgSsukDSNQpSrahZOguyxK8j5TdZ5zzqQGpYtGD1My4Z2k1WlxB5MmQ= X-Received: by 2002:a05:690e:13c8:b0:641:f5bc:68d1 with SMTP id 956f58d0204a3-6466a8c0011mr7739222d50.78.1766336298645; Sun, 21 Dec 2025 08:58:18 -0800 (PST) MIME-Version: 1.0 References: <2547700.1765940917@sss.pgh.pa.us> <9a0ce31a49f149d8d982d2b359095560655f781e.camel@cybertec.at> <699b6649-6841-48a7-8182-b92d28a70ff7@aklaver.com> In-Reply-To: <699b6649-6841-48a7-8182-b92d28a70ff7@aklaver.com> From: Igor Korot Date: Sun, 21 Dec 2025 08:58:07 -0800 X-Gm-Features: AQt7F2rULivmExFHVppqaokIo_lUF8InSE-gVfoM8vxOimGM-ecYL4O2QkIMMSY Message-ID: Subject: Re: PQexecPrepared() question To: Adrian Klaver Cc: "David G. Johnston" , Laurenz Albe , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000a27c170646793735" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a27c170646793735 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, So what is the best way to make it work? Thank you. On Sun, Dec 21, 2025 at 7:34=E2=80=AFAM Adrian Klaver wrote: > On 12/21/25 03:56, Igor Korot wrote: > > Hi, David, > > > > Attached is a script I ran on a server (from psql). > > > > The offending line is: > > > > CREATE TABLE abc=C3=9F(id integer primary key, name text); > > > > Script ran successfully. > > > > Using the ODBC driver everything works. I didn't change anything in > > the driver setup. > > Same setup - Windows client connecting to Linux server. > > It is not the same setup, in your original question you are hand writing > code not running a script through the ODBC driver. Best bet is the ODBC > driver is picking up the client(Windows) encoding and passing it to the > server. Crank up the logging on both ends, the ODBC driver and the > Postgres server and see what is hitting the server when you use the drive= r. > > > > > Any other info needed - please do tell. > > > > Thank you. > > > > > > On Sat, Dec 20, 2025 at 11:47=E2=80=AFPM David G. Johnston > > wrote: > > -- > Adrian Klaver > adrian.klaver@aklaver.com > --000000000000a27c170646793735 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

So= what is the best way to make it work?

Thank you.


On Sun, Dec 21, 2025 at 7:34=E2=80=AFAM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 12/21/25 03:56, Igor Korot wrote:=
> Hi, David,
>
> Attached is a script I ran on a server (from psql).
>
> The offending line is:
>
> CREATE TABLE abc=C3=9F(id integer primary key, name text);
>
> Script ran successfully.
>
> Using the ODBC driver everything works. I didn't change anything i= n
> the driver setup.
> Same setup - Windows client connecting to Linux server.

It is not the same setup, in your original question you are hand writing code not running a script through the ODBC driver. Best bet is the ODBC driver is picking up the client(Windows) encoding and passing it to the server. Crank up the logging on both ends, the ODBC driver and the
Postgres server and see what is hitting the server when you use the driver.=

>
> Any other info needed - please do tell.
>
> Thank you.
>
>
> On Sat, Dec 20, 2025 at 11:47=E2=80=AFPM David G. Johnston
> <da= vid.g.johnston@gmail.com> wrote:

--
Adrian Klaver
adrian.klave= r@aklaver.com
--000000000000a27c170646793735--