> -- Securisation du search_path: les schémas de confiance, puis
> The error message is :
>
> ERROR: invalid byte sequence for encoding "UTF8": 0xe9 0x6d 0x61
I'm guessing your client is actually using an encoding of something like LATIN1, but is identifying itself as UTF8.
The sequence 0xe9 0x6d 0x61 in LATIN1 is "éma", which matches your line with 'les schémas'.
However, 0xe9 is invalid in UTF8.
To validate this, you could do the following:
select current_setting('client_encoding');
set client_encoding to 'LATIN1';
select current_setting('client_encoding');
before executing your command.
By the way, did you know you can set configuration parameters per function on a different way as well:
CREATE OR REPLACE FUNCTION abc()
RETURNS boolean
LANGUAGE SQL AS $$
SELECT true;
$$
SET search_path TO 'public, pg_temp';