File: icu_ext--1.8--1.9.sql

package info (click to toggle)
icu-ext 1.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 360 kB
  • sloc: ansic: 2,701; sql: 763; makefile: 22; sh: 2
file content (27 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-- complain if script is sourced in psql, rather than via CREATE/ALTER EXTENSION
\echo Use "ALTER EXTENSION icu_ext UPDATE TO '1.9'" to load this file. \quit

CREATE FUNCTION icu_char_type(character) RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT STABLE;

COMMENT ON FUNCTION icu_char_type(character)
 IS 'Return the general category value for the code point';

CREATE FUNCTION icu_char_ublock_id(character) RETURNS smallint
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT STABLE;

COMMENT ON FUNCTION icu_char_ublock_id(character)
 IS 'Return a numerical ID corresponding to the Unicode block of the given code point';

CREATE FUNCTION icu_unicode_blocks(
 OUT block_id int2,
 OUT block_name text
)
RETURNS SETOF record
AS 'MODULE_PATHNAME'
LANGUAGE C STABLE;

COMMENT ON FUNCTION icu_unicode_blocks()
 IS 'Return the list of Unicode blocks with their internal ID';