pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Denis BUCHER <dbucherml@hsolutions.ch>
To: pgsql-sql@postgresql.org
Subject: Question about encoding
Date: Mon, 24 Aug 2009 18:42:45 +0200
Message-ID: <4A92C305.2020303@hsolutions.ch> (raw)

Hello,

I'm sure you already replied tons of questions like this, but I don't
understand something.

This is the situation :
* I have COPY commands from a dump, encoded as UTF8 (special characters
are encoded as 2-bytes).
* My file contains SET client_encoding = 'UTF8';
* But when I do psql <myfile.sql I get an error for 40 characters long
strings that have UTF8 characters : ERROR:  value too long for type
character varying(40)
* I think I understand why, psql -l says that my database is SQL_ASCII
* Postgresql 7.4

Question 1 :
Is it the expected behavior ? These characters have a SQL_ASCII
equivalent because I already have them stored in another table of the
same database

Question 2 :
If yes, then I suppose I should have the database as LATIN1 or UTF8.
Can I change/convert the encoding of the database ? Or at least of the
schema (which would be even better)

Thanks a lot for any help :-)))

Denis



view thread (3+ messages)  latest in thread

Message-ID: <4A92C305.2020303@hsolutions.ch>
Permalink:  ../4A92C305.2020303@hsolutions.ch/
Also on:    postgresql.org/message-id/4A92C305.2020303@hsolutions.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dbucherml@hsolutions.ch
  Subject: Re: Question about encoding
  In-Reply-To: <4A92C305.2020303@hsolutions.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox