Re: [PATCH] Patch to fix a crash of psql

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: [PATCH] Patch to fix a crash of psql
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C208C0C978@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: [PATCH] Patch to fix a crash of psql  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: [PATCH] Patch to fix a crash of psql  (Peter Eisentraut <peter_e@gmx.net>)
Re: [PATCH] Patch to fix a crash of psql  (Tatsuo Ishii <ishii@postgresql.org>)
Список pgsql-hackers
Tatsuo Ishii wrote:
> I think we should detect the cases as much as possible and warn users,
> rather than silently ignore that fact client encoding != file
> encoding. I don't think we can detect it in a reliable way, but at
> least we could check the cases above(sum of PQmblen is not equale to
> buffer lenghth). So my proposal is, if prepare_buffer() detects
> possible inconsistency between buffer encoding and file encoding, warn
> user.
>
> [t-ishii@localhost psql]$ PGCLIENTENCODING=SJIS psql postgres
> Pager usage is off.
> psql (9.3devel)
> Type "help" for help.
>
> postgres=# \i ~/sql
> CREATE DATABASE
> You are now connected to database "mydb" as user "t-ishii".
> CREATE SCHEMA
> psql:/home/t-ishii/sql:7: warning: possible conflict between client
encoding SJIS and input file
> encoding
> CREATE TABLE
>
> Comments?

I wonder about the "possible".

Could there be false positives with the test?
If yes, I don't like the idea.
If there is no possibility for false positives, I'd say
that the "possible" should go.  Maybe it should even be
an error and no warning then.

Yours,
Laurenz Albe



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: PQconninfo function for libpq
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: [PATCH] Make pg_basebackup configure and start standby [Review]