some latin2 characters not correctly read from script

From: Jan Poslusny <pajout(at)gingerall(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: some latin2 characters not correctly read from script
Date: 2003-11-07 10:29:58
Message-ID: 3FAB7426.10602@gingerall.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name : Jan Poslusny
Your email address : pajout(at)gingerall(dot)cz


System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.20-8

PostgreSQL version (example: PostgreSQL-7.3.4): PostgreSQL-7.3.4

Compiler used (example: gcc 2.95.2) : gcc 3.2.2


Please enter a FULL description of your problem:
------------------------------------------------
I initialized dbcluster with --locale=cs_CZ.UTF-8 and created database
with --encoding=unicode. Following script generates error:
-- -*- coding: iso-8859-2 -*-
set client_encoding to LATIN2;
create table t (txt text);
begin;
--inserted character is latin small letter r with caron, coded in iso
8859-2; escaped as \370
insert into t values ('ř');
insert into t values ('\\@');
commit;
-- end of script
, generates
SET
CREATE TABLE
BEGIN
psql:test.sql:7: invalid command \
psql:test.sql:9: ERROR: parser: unterminated quoted string at or near "'
commit;" at character 52
. I think this is a bug, because the script is syntactically OK and work
fine on database with server_encoding=latin2.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Above example is reproducible.




If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
Perhaps lc_ctype=cs_CZ.UTF-8 is used when script is read.

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Grabowski 2003-11-07 10:53:08 suggest: change alter user set search_path to raise notice not error
Previous Message Micah Yoder 2003-11-07 01:03:54 The postmaster keeps crashing