Skip site navigation (1) Skip section navigation (2)

Re: Character set conversion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bastiaan Olij <lists(at)basenlily(dot)nl>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Character set conversion
Date: 2008-07-21 14:16:40
Message-ID: (view raw or whole thread)
Lists: pgsql-novice
Bastiaan Olij <lists(at)basenlily(dot)nl> writes:
> I read in the documentation about the 'Create conversion' command 
> writing a function to do the conversion job. Is this the best way 
> forward or are there better ways to attempt this? Is there any sample 
> code available for implementing such a conversion? I don't want to 
> reinvent the wheel here...

Look into the PG source code under

While an add-on conversion procedure isn't too hard, I don't think
there's any way to define a whole new encoding without modifying the
source code --- the encodings are listed in some hard-coded tables
in the C code rather than being defined by a system catalog.  It
wouldn't be too hard if you don't mind running a custom Postgres
build; but if you do, then the best answer might be to cannibalize
one of the existing encoding names and just replace its conversion

			regards, tom lane

In response to


pgsql-novice by date

Next:From: Wright, GeorgeDate: 2008-07-22 20:00:32
Subject: libpq question
Previous:From: Bastiaan OlijDate: 2008-07-21 06:48:22
Subject: Character set conversion

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group