public inbox for [email protected]
help / color / mirror / Atom feedRe: PQexecPrepared() question
3+ messages / 2 participants
[nested] [flat]
* Re: PQexecPrepared() question
@ 2025-12-17 05:53 Igor Korot <[email protected]>
2025-12-17 07:32 ` Re: PQexecPrepared() question Laurenz Albe <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Igor Korot @ 2025-12-17 05:53 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>
Thx, Tom..
Is there some default value for client_encoding?
Thank you.
On Tue, Dec 16, 2025 at 7:08 PM Tom Lane <[email protected]> wrote:
>
> Igor Korot <[email protected]> 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.
>
> regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PQexecPrepared() question
2025-12-17 05:53 Re: PQexecPrepared() question Igor Korot <[email protected]>
@ 2025-12-17 07:32 ` Laurenz Albe <[email protected]>
2025-12-17 17:38 ` Re: PQexecPrepared() question Igor Korot <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Laurenz Albe @ 2025-12-17 07:32 UTC (permalink / raw)
To: Igor Korot <[email protected]>; Tom Lane <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>
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=auto", by the encoding set in
the client's environment
- by setting the PGCLIENTENCODING environment variable
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PQexecPrepared() question
2025-12-17 05:53 Re: PQexecPrepared() question Igor Korot <[email protected]>
2025-12-17 07:32 ` Re: PQexecPrepared() question Laurenz Albe <[email protected]>
@ 2025-12-17 17:38 ` Igor Korot <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Igor Korot @ 2025-12-17 17:38 UTC (permalink / raw)
To: Laurenz Albe <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
Thank you.
On Tue, Dec 16, 2025 at 11:32 PM Laurenz Albe <[email protected]>
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=auto", by the encoding set in
> the client's environment
>
> - by setting the PGCLIENTENCODING environment variable
>
> Yours,
> Laurenz Albe
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-12-17 17:38 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-17 05:53 Re: PQexecPrepared() question Igor Korot <[email protected]>
2025-12-17 07:32 ` Laurenz Albe <[email protected]>
2025-12-17 17:38 ` Igor Korot <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox