pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dan Libby <dan@libby.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: dump/restore results in duplicate key violation with 7.4.6.
Date: Sat, 13 Nov 2004 19:12:28 -0500
Message-ID: <4026.1100391148@sss.pgh.pa.us> (raw)
In-Reply-To: <418F08C7.60305@libby.com>
References: <418BD67D.1010108@osc.co.cr>
	<418BE4A2.1060506@libby.com>
	<418F08C7.60305@libby.com>

Dan Libby <dan@libby.com> writes:
> 1) I don't understand why a difference in locale should cause a 
> duplicate key error, especially when both databases were created using 
> 'UNICODE' encoding.  Is this valid behavior or a postgres bug?

The past reports I've seen of such misbehavior appeared to result
from strcoll() failing to cope well with multibyte sequences that
were illegal according to the selected locale's idea of the character
set in use.  You can get burnt by this quite easily if you set the
database encoding to something not compatible with the locale.
If you didn't make that mistake, then I'd bet on Postgres having a
more liberal idea of what are valid characters in the encoding than
the locale definition does.  Whether that is Postgres' bug or the
locale definition's is impossible to say without more data.

			regards, tom lane



view thread (4+ messages)

Message-ID: <4026.1100391148@sss.pgh.pa.us>
Permalink:  ../4026.1100391148@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4026.1100391148@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dan@libby.com
  Subject: Re: dump/restore results in duplicate key violation with 7.4.6.
  In-Reply-To: <4026.1100391148@sss.pgh.pa.us>
  References: <418BD67D.1010108@osc.co.cr> <418BE4A2.1060506@libby.com> <418F08C7.60305@libby.com> <4026.1100391148@sss.pgh.pa.us>

* 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