From 27b8143944dc0585597bdaa3ae5e5b49a4760def Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 5 Jun 1999 19:09:48 +0000 Subject: Hi, I have updated my contrib code for version 6.5. In the attachment you will find the directories array, datetime, miscutil, string, tools and userlocks which replace the corresponding directories under contrib. In contrib/tools you will find some developement scripts which I use while hacking the sources. I hope they will be useful for some other people. I have also added a contrib/Makefile which tries to compile and install all the contribs. Unfortunately many of them don't have a Makefile or don't compile cleanly. -- Massimo Dal Zotto --- contrib/array/array_iterator.sql.in | 76 ++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 18 deletions(-) (limited to 'contrib/array/array_iterator.sql.in') diff --git a/contrib/array/array_iterator.sql.in b/contrib/array/array_iterator.sql.in index cc95c8aea7b..d4182b112e2 100644 --- a/contrib/array/array_iterator.sql.in +++ b/contrib/array/array_iterator.sql.in @@ -39,43 +39,84 @@ create operator **~ ( procedure=array_all_textregexeq); --- define the array operators *=, **=, *~ and **~ for type _char16 +-- define the array operators *=, **=, *~ and **~ for type _varchar -- -create function array_char16eq(_char16, char16) returns bool +-- NOTE: "varchar" is also a reserved word and must be quoted. +-- +create function array_varchareq(_varchar, varchar) returns bool as 'MODULE_PATHNAME' language 'c'; -create function array_all_char16eq(_char16, char16) returns bool +create function array_all_varchareq(_varchar, varchar) returns bool as 'MODULE_PATHNAME' language 'c'; -create function array_char16regexeq(_char16, text) returns bool +create function array_varcharregexeq(_varchar, varchar) returns bool as 'MODULE_PATHNAME' language 'c'; -create function array_all_char16regexeq(_char16, text) returns bool +create function array_all_varcharregexeq(_varchar, varchar) returns bool as 'MODULE_PATHNAME' language 'c'; create operator *= ( - leftarg=_char16, - rightarg=char16, - procedure=array_char16eq); + leftarg=_varchar, + rightarg="varchar", + procedure=array_varchareq); create operator **= ( - leftarg=_char16, - rightarg=char16, - procedure=array_all_char16eq); + leftarg=_varchar, + rightarg="varchar", + procedure=array_all_varchareq); create operator *~ ( - leftarg=_char16, - rightarg=text, - procedure=array_char16regexeq); + leftarg=_varchar, + rightarg="varchar", + procedure=array_varcharregexeq); create operator **~ ( - leftarg=_char16, - rightarg=text, - procedure=array_all_char16regexeq); + leftarg=_varchar, + rightarg="varchar", + procedure=array_all_varcharregexeq); + + +-- define the array operators *=, **=, *~ and **~ for type _bpchar +-- +create function array_bpchareq(_bpchar, bpchar) returns bool + as 'MODULE_PATHNAME' + language 'c'; + +create function array_all_bpchareq(_bpchar, bpchar) returns bool + as 'MODULE_PATHNAME' + language 'c'; + +create function array_bpcharregexeq(_bpchar, bpchar) returns bool + as 'MODULE_PATHNAME' + language 'c'; + +create function array_all_bpcharregexeq(_bpchar, bpchar) returns bool + as 'MODULE_PATHNAME' + language 'c'; + +create operator *= ( + leftarg=_bpchar, + rightarg=bpchar, + procedure=array_bpchareq); + +create operator **= ( + leftarg=_bpchar, + rightarg=bpchar, + procedure=array_all_bpchareq); + +create operator *~ ( + leftarg=_bpchar, + rightarg=bpchar, + procedure=array_bpcharregexeq); + +create operator **~ ( + leftarg=_bpchar, + rightarg=bpchar, + procedure=array_all_bpcharregexeq); -- define the array operators *=, **=, *> and **> for type _int4 @@ -209,5 +250,4 @@ create operator **<> ( procedure=array_all_oidne); - -- end of file -- cgit v1.2.3