Re: PQexecPrepared() question

2025-12-18 Thread Igor Korot
Hi, David, On Thu, Dec 18, 2025 at 7:41 AM David G. Johnston wrote: > > On Thu, Dec 18, 2025 at 8:20 AM Igor Korot wrote: >> >> 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.

Re: PQexecPrepared() question

2025-12-18 Thread David G. Johnston
On Thu, Dec 18, 2025 at 8:20 AM Igor Korot wrote: > 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? > This day in age, probably UTF-8; which

Re: PQexecPrepared() question

2025-12-18 Thread Igor Korot
Hi, On Tue, Dec 16, 2025 at 11:32 PM 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 con

Re: PQexecPrepared() question

2025-12-17 Thread Igor Korot
Thank you. On Tue, Dec 16, 2025 at 11:32 PM 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 se

Re: PQexecPrepared() question

2025-12-16 Thread Laurenz Albe
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: - exp

Re: PQexecPrepared() question

2025-12-16 Thread Igor Korot
Thx, Tom.. Is there some default value for client_encoding? Thank you. On Tue, Dec 16, 2025 at 7:08 PM Tom Lane wrote: > > Igor Korot writes: > > If I want to have strings (aka char *) as parameters fr the query, > > should I send UTF-8 strings or something else? > > They should be in whatever

Re: PQexecPrepared() question

2025-12-16 Thread Tom Lane
Igor Korot writes: > If I want to have strings (aka char *) as parameters fr the query, > should I send UTF-8 strings or something else? They should be in whatever is selected as the client_encoding on your connection. That goes for query strings too, and whatever other text a client might send.

PQexecPrepared() question

2025-12-16 Thread Igor Korot
Hi, ALL, If I want to have strings (aka char *) as parameters fr the query, should I send UTF-8 strings or something else? Thank you.