From: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | new SQL command: CREATE CONVERSION/DROP CONVERSION added |
Date: | 2002-07-11 07:57:12 |
Message-ID: | 20020711.165712.58456944.t-ishii@sra.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have committed changes enabling new CREATE CONVERSION/DROP
CONVERSION SQL commands. You can issue these SQL commands, but they
just add/remove tuples to/from new system catalog pg_conversion.
Still needs lots of work...
Initdb required.
For those who wishes to try these (currently) useless commands, here
is the brief description:
CREATE [DEFAULT] CONVERSION conversion_name FOR for_encoding_name
TO to_encoding_name FROM function_name;
DROP CONVERSION conversion_name;
description:
CREATE CONVERSION creates new encoding conversion. conversion_name is
the name of the conversion possibly schema qualified name(yes,
conversion is schema aware). Duplicate conversion name is not allowed
in a schema. for_encoding_name is the encoding of the source
text. to_encoding_name is the encoding of the destination
text. function_name is the C function actually performs the
conversion(see below for the function signature).
If DEFAULT is specified, then the conversion is used for the automatic
frontend/backend encoding conversion.
conversion function signature is as follows:
pgconv(
INTEGER, -- source encoding id
INTEGER, -- destination encoding id
OPAQUE, -- source string (null terminated C string)
OPAQUE, -- destination string (null terminated C string)
INTEGER -- source string length
) returns INTEGER; -- dummy. returns nothing, actually.
--
Tatsuo Ishii
From | Date | Subject | |
---|---|---|---|
Next Message | Karel Zak | 2002-07-11 08:14:28 | Re: Proposal: CREATE CONVERSION |
Previous Message | Tatsuo Ishii | 2002-07-11 06:37:49 | Re: Proposal: CREATE CONVERSION |