1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

i have made minor changes to array_iterator to make it work with

pgsql-6.3.2. I think array_iterator is a great thing to have!!!

With best regards,


Tobias Gabele
This commit is contained in:
Bruce Momjian
1999-01-21 22:40:16 +00:00
parent cdbaec771c
commit 7311da9ec4
3 changed files with 163 additions and 34 deletions

View File

@ -1,13 +1,6 @@
-- array_iterator.sql --
--
-- SQL code to define the array iterator functions and operators.
--
-- Copyright (c) 1998, Massimo Dal Zotto <dz@cs.unitn.it>
--
-- This file is distributed under the GNU General Public License
-- either version 2, or (at your option) any later version.
-- SQL code to define the new array iterator functions and operators
-- Define the array functions *=, **=, *~ and **~ for type _text
-- define the array operators *=, **=, *~ and **~ for type _text
--
create function array_texteq(_text, text) returns bool
as 'MODULE_PATHNAME'
@ -45,7 +38,47 @@ create operator **~ (
rightarg=text,
procedure=array_all_textregexeq);
-- Define the array functions *=, **=, *> and **> for type _int4
-- define the array operators *=, **=, *~ and **~ for type _char16
--
create function array_char16eq(_char16, char16) returns bool
as 'MODULE_PATHNAME'
language 'c';
create function array_all_char16eq(_char16, char16) returns bool
as 'MODULE_PATHNAME'
language 'c';
create function array_char16regexeq(_char16, text) returns bool
as 'MODULE_PATHNAME'
language 'c';
create function array_all_char16regexeq(_char16, text) returns bool
as 'MODULE_PATHNAME'
language 'c';
create operator *= (
leftarg=_char16,
rightarg=char16,
procedure=array_char16eq);
create operator **= (
leftarg=_char16,
rightarg=char16,
procedure=array_all_char16eq);
create operator *~ (
leftarg=_char16,
rightarg=text,
procedure=array_char16regexeq);
create operator **~ (
leftarg=_char16,
rightarg=text,
procedure=array_all_char16regexeq);
-- define the array operators *=, **=, *> and **> for type _int4
--
create function array_int4eq(_int4, int4) returns bool
as 'MODULE_PATHNAME'
@ -95,8 +128,6 @@ create function array_all_int4le(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
-- Define the operators corresponding to the above functions
--
create operator *= (
leftarg=_int4,
rightarg=int4,
@ -157,4 +188,26 @@ create operator **<= (
rightarg=int4,
procedure=array_all_int4le);
-- define the array operators *=, **<> for type _oid (added tobias 1. 1999)
--
create function array_oideq(_oid, oid) returns bool
as 'MODULE_PATHNAME'
language 'c';
create function array_all_oidne(_oid, oid) returns bool
as 'MODULE_PATHNAME'
language 'c';
create operator *= (
leftarg=_oid,
rightarg=oid,
procedure=array_oideq);
create operator **<> (
leftarg=_oid,
rightarg=oid,
procedure=array_all_oidne);
-- end of file