Re: pg_execute_from_file review - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: pg_execute_from_file review
Date
Msg-id m2fwujcfb3.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: pg_execute_from_file review  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@gmail.com> writes:
> client_encoding won't work at all because read_sql_queries_from_file()
> uses pg_verifymbstr(), that is verify the input with *server_encoding*.
>
> Even if we replace it with pg_verify_mbstr(client_encoding, ...) and
> pg_do_encoding_conversion(from client_encoding to server_encoding),
> it still won't work well when error messages are raised. The client
> expects the original client encoding, but messages are sent in the
> file encoding. It would be a security hole.

I'll confess I'm at a loss here wrt how to solve your concerns.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: pg_execute_from_file review
Next
From: Heikki Linnakangas
Date:
Subject: Re: GiST insert algorithm rewrite