encoding and parser: error? - Mailing list pgsql-general

From Hubert Fröhlich
Subject encoding and parser: error?
Date
Msg-id 3F65DA46.5080709@bvv.bayern.de
Whole thread Raw
Responses Re: encoding and parser: error?
List pgsql-general
Hi list

I am working with postgresql 7.1.3 and 7.3.4 and German characters. I
use only unicode databases.

When importing data from iso-latin-1 via psql I tried


  drop table test;
  create table test(nr int, text1 text, text2 text) ;
  set client_encoding to 'latin1';
  insert into test values(0,'these are all','German characters');
  insert into test values(1,'--','abcäöüÄÖÜß');
  insert into test values(2,'we insert','one German character');
  insert into test values(3,'e.g.','ö');
  insert into test values(4,'we insert','two German character');
  insert into test values(5,'e.g.','öü');


so far ok, but when I try


  insert into test values(6,'we insert','a very special address');
  insert into test values(7,'----','6 /6,Basinköy');

I got the prompt like
test1'#
telling me that some ' seems missing.

When I ignore that and continue


  insert into test values(8,'again','two German characters');
  insert into test values(9,'e.g.','öü');
  select * from test;

everything seems OK !!

Moreover, when I use the metacommand

/encoding latin1
instead of the "set client_encoding"  SQLcommand (which should be
equivalent,
everything goes OK right from the beginning.

Why? Some parser error?

Thank you for your help.

Regards,

Hubert




--
-------------------------------------------------------------------------------
Dr.-Ing. Hubert Fröhlich
Bezirksfinanzdirektion München
Alexandrastr. 3, D-80538 München, GERMANY
Tel. :+49 (0)89 / 2190 - 2980
Fax  :+49 (0)89 / 2190 - 2459
hubert.froehlich@bvv.bayern.de


pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Updates with NULL
Next
From: Dennis Gearon
Date:
Subject: Re: Updates with NULL