How to add a new encoding support?

From: forth(at)pagic(dot)net
To: pgsql-hackers(at)postgresql(dot)org
Subject: How to add a new encoding support?
Date: 2001-10-06 23:14:39
Message-ID: 541044.1002410079884.JavaMail.root@ap.pagic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I need to use some Chinese characters in charset MS950(CP950) but
not in Big5. Big5 and MS950 encoding are very much similiar but
currently there is no support for MS950 and I will need to add it.
I've read files in src/backend/utils/mb directory but still not
sure what files to modify. Or can I just replace the Big5 mapping?
Thanks for your help.

--
Regards,
Zhenbang Wei
forth(at)mail(dot)net(dot)tw
>From pgsql-hackers-owner(at)postgresql(dot)org Wed Oct 10 14:52:55 2001
Received: from spitfire.velocet.net (spitfire.velocet.net [216.138.223.227])
by postgresql.org (8.11.3/8.11.4) with ESMTP id f970Ddn87358
for <pgsql-hackers(at)postgresql(dot)org>; Sat, 6 Oct 2001 20:13:40 -0400 (EDT)
(envelope-from rbt(at)zort(dot)ca)
Received: from mail.barchord.com (H97.C194.tor.velocet.net [216.138.194.97])
by spitfire.velocet.net (Postfix) with ESMTP id B57E944A94C
for <pgsql-hackers(at)postgresql(dot)org>; Sat, 6 Oct 2001 20:13:34 -0400 (EDT)
Received: (qmail 49972 invoked by uid 0); 7 Oct 2001 00:13:31 -0000
Received: from unknown (HELO h97.c194.tor.velocet.net) (192.168.1.11)
by 192.168.1.2 with DES-CBC3-SHA encrypted SMTP; 7 Oct 2001 00:13:31 -0000
Received: (qmail 26775 invoked by uid 0); 6 Oct 2001 20:12:27 -0000
Received: from h97.c194.tor.velocet.net (HELO jester) (216.138.194.97)
by 192.168.1.11 with RC4-MD5 encrypted SMTP; 6 Oct 2001 20:12:27 -0000
Message-ID: <000b01c14ec4$f0fc07d0$8001a8c0(at)jester>
From: "Rod Taylor" <rbt(at)zort(dot)ca>
To: "Brent Verner" <brent(at)rcfile(dot)org>,
"pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
References: <20011004233824(dot)A2587(at)rcfile(dot)org> <6961(dot)1002289608(at)sss(dot)pgh(dot)pa(dot)us> <20011005101817(dot)A4734(at)rcfile(dot)org> <20011006194932(dot)A13304(at)rcfile(dot)org>
Subject: Re: ALTER RENAME and indexes
Date: Sat, 6 Oct 2001 20:13:49 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
X-Archive-Number: 200110/411
X-Sequence-Number: 14153

Of course, in 7.1 foreign key constraints become rather confused when
you rename columns on them.

create table parent (id serial);
create table child (id int4 references parent(id) on update cascade);
alter table parent rename column id to anotherid;
alter table child rename column id to junk;
insert into child values (1);

-> ERROR: constraint <unnamed>: table child does now have an
attribute id

--
Rod Taylor

There are always four sides to every story: your side, their side, the
truth, and what really happened.

----- Original Message -----
From: "Brent Verner" <brent(at)rcfile(dot)org>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Sent: Saturday, October 06, 2001 7:49 PM
Subject: Re: [HACKERS] ALTER RENAME and indexes

> On 05 Oct 2001 at 10:18 (-0400), Brent Verner wrote:
> | On 05 Oct 2001 at 09:46 (-0400), Tom Lane wrote:
> | | Brent Verner <brent(at)rcfile(dot)org> writes:
> | | > 'ALTER TABLE tbl RENAME col1 TO col2' does not update any
indices that
> | | > reference the old column name.
> | |
> | | It doesn't need to; the indexes link to column numbers, not
column
> | | names.
>
> ah, I think I see the problem... The pg_attribute.attname just needs
> updating, right? I suspect this after noticing that the
> pg_get_indexdef(Oid) function produced the correct(expected)
results,
> while those using pg_attribute were wrong.
>
> If this is the _wrong_ answer for this, stop me before I make a
> big mess :-)
>
> working...
> b
>
> --
> "Develop your talent, man, and leave the world something. Records
are
> really gifts from people. To think that an artist would love you
enough
> to share his music with anyone is a beautiful thing." -- Duane
Allman
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo(at)postgresql(dot)org
>

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-10-06 23:25:47 Re: Patch for fixing a few memory leaks
Previous Message Rene Pijlman 2001-10-06 21:36:26 Re: anoncvs and CVS link off developers.postgresql.org