Re: PQexecPrepared() question

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: PQexecPrepared() question
Date: 2025-12-20 17:02:13
Message-ID: 5ef09c253188681e2beeb975d96d7ebf861f2b10.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2025-12-19 at 23:04 -0800, Igor Korot wrote:
> > SQL_ASCII as client encoding means that no conversion will take place.
> >
> > Still, the database encoding (I suspect UTF8) will govern what can be stored
> > in the database.  Anything that is not valid UTF-8 will be rejected.
>
> Rejected how?

As you experienced: by throwing an error.

> > A SELECT will never cause an error - the client will just receive data
> > in UTF-8.
>
> And then what?

The *client application* will receive UTF-8 data.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2025-12-21 05:33:23 Re: PQexecPrepared() question
Previous Message Igor Korot 2025-12-20 07:04:03 Re: PQexecPrepared() question