Re: Proposal: CREATE CONVERSION

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: zakkr(at)zf(dot)jcu(dot)cz
Cc: peter_e(at)gmx(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: CREATE CONVERSION
Date: 2002-07-09 01:07:11
Message-ID: 20020709.100711.35681203.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Use a simple wrap function.
>
> How knows this function to/from encoding?

For example you want to define a function for LATIN1 to UNICODE conversion
function would look like:

function_for_LATIN1_to_UTF-8(from_string opaque, to_string opaque, length
integer)
{
:
:
generic_function_using_iconv(from_str, to_str, "ISO-8859-1", "UTF-8",
length);
}

CREATE FUNCTION function_for_LATIN1_to_UTF-8(opaque, opaque, integer)
RETURNS integer;
CREAE CONVERSION myconversion FOR 'LATIN1' TO 'UNICODE' FROM
function_for_LATIN1_to_UTF-8;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-07-09 01:07:24 Re: Proposal: CREATE CONVERSION
Previous Message Tatsuo Ishii 2002-07-09 01:06:59 Re: Proposal: CREATE CONVERSION