Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit317ff59

Browse files
committed
to_ascii( text )
- encode 'text' from database encoding to ASCII to_ascii('\256\341k') to_ascii( text, int4 ) - encode 'text' from 'int4' encoding to ASCII to_ascii('\256\341k', 8) to_ascii( text, name ) - encode 'text' from 'name' encoding to ASCII to_ascii('\256\341k', 'LATIN2') Now is supported LATIN1, LATIN2, WIN1250. For other character sets Ihaven't good resources. Add new encoding is easy... If encoding is not supported returns ERROR. Note --- not exists total corect conversion to ASCII, this function try convert chars those is _probably_ interpret-able in ASCII for others use ' '. But for example for all Czech characters it is sufficient ... hmm Chinese / JAP and other complicated langshave bad luck here :-( Karel
1 parenta1464e9 commit317ff59

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

‎src/backend/utils/adt/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Makefile for utils/adt
33
#
4-
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.41 2000/07/30 22:13:52 tgl Exp $
4+
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.42 2000/08/04 15:45:07 momjian Exp $
55
#
66

77
subdir = src/backend/utils/adt
@@ -23,7 +23,8 @@ OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o \
2323
regexp.o regproc.o ruleutils.o selfuncs.o sets.o\
2424
tid.o timestamp.o varbit.o varchar.o varlena.o version.o\
2525
network.o mac.o inet_net_ntop.o inet_net_pton.o\
26-
ri_triggers.o pg_lzcompress.o pg_locale.o formatting.o
26+
ri_triggers.o pg_lzcompress.o pg_locale.o formatting.o\
27+
ascii.o
2728

2829
all: SUBSYS.o
2930

‎src/include/catalog/pg_proc.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_proc.h,v 1.157 2000/08/03 23:07:46 tgl Exp $
10+
* $Id: pg_proc.h,v 1.158 2000/08/04 15:45:12 momjian Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2442,6 +2442,14 @@ DESCR("aggregate transition function");
24422442
DATA(insertOID=1844 (interval_avgPGUID12fttt1f1186"1187"10000100interval_avg- ));
24432443
DESCR("AVG aggregate final function");
24442444

2445+
/* To ASCII conversion */
2446+
DATA(insertOID=1845 (to_asciiPGUID12fttt1f25"25"10000100to_ascii_default- ));
2447+
DESCR("encode text from DB encoding to ASCII text");
2448+
DATA(insertOID=1846 (to_asciiPGUID12fttt2f25"25 23"10000100to_ascii_enc- ));
2449+
DESCR("encode text from encoding to ASCII text");
2450+
DATA(insertOID=1847 (to_asciiPGUID12fttt2f25"25 19"10000100to_ascii_encname- ));
2451+
DESCR("encode text from encoding to ASCII text");
2452+
24452453
DATA(insertOID=1850 (int28eqPGUID12fttt2f16"21 20"10000100int28eq- ));
24462454
DESCR("equal");
24472455
DATA(insertOID=1851 (int28nePGUID12fttt2f16"21 20"10000100int28ne- ));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp