mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
This patch adds support for inet[] arrays to the /contrib/array module.
Neil Conway
This commit is contained in:
@ -2,19 +2,19 @@
|
||||
|
||||
-- define the array operators *=, **=, *~ and **~ for type _text
|
||||
--
|
||||
create function array_texteq(_text, text) returns bool
|
||||
create or replace function array_texteq(_text, text) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_texteq(_text, text) returns bool
|
||||
create or replace function array_all_texteq(_text, text) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_textregexeq(_text, text) returns bool
|
||||
create or replace function array_textregexeq(_text, text) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_textregexeq(_text, text) returns bool
|
||||
create or replace function array_all_textregexeq(_text, text) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
@ -43,19 +43,19 @@ create operator **~ (
|
||||
--
|
||||
-- NOTE: "varchar" is also a reserved word and must be quoted.
|
||||
--
|
||||
create function array_varchareq(_varchar, varchar) returns bool
|
||||
create or replace function array_varchareq(_varchar, varchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_varchareq(_varchar, varchar) returns bool
|
||||
create or replace function array_all_varchareq(_varchar, varchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_varcharregexeq(_varchar, varchar) returns bool
|
||||
create or replace function array_varcharregexeq(_varchar, varchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_varcharregexeq(_varchar, varchar) returns bool
|
||||
create or replace function array_all_varcharregexeq(_varchar, varchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
@ -82,19 +82,19 @@ create operator **~ (
|
||||
|
||||
-- define the array operators *=, **=, *~ and **~ for type _bpchar
|
||||
--
|
||||
create function array_bpchareq(_bpchar, bpchar) returns bool
|
||||
create or replace function array_bpchareq(_bpchar, bpchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_bpchareq(_bpchar, bpchar) returns bool
|
||||
create or replace function array_all_bpchareq(_bpchar, bpchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_bpcharregexeq(_bpchar, bpchar) returns bool
|
||||
create or replace function array_bpcharregexeq(_bpchar, bpchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_bpcharregexeq(_bpchar, bpchar) returns bool
|
||||
create or replace function array_all_bpcharregexeq(_bpchar, bpchar) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
@ -121,51 +121,51 @@ create operator **~ (
|
||||
|
||||
-- define the array operators *=, **=, *> and **> for type _int4
|
||||
--
|
||||
create function array_int4eq(_int4, int4) returns bool
|
||||
create or replace function array_int4eq(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_int4eq(_int4, int4) returns bool
|
||||
create or replace function array_all_int4eq(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_int4ne(_int4, int4) returns bool
|
||||
create or replace function array_int4ne(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_int4ne(_int4, int4) returns bool
|
||||
create or replace function array_all_int4ne(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_int4gt(_int4, int4) returns bool
|
||||
create or replace function array_int4gt(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_int4gt(_int4, int4) returns bool
|
||||
create or replace function array_all_int4gt(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_int4ge(_int4, int4) returns bool
|
||||
create or replace function array_int4ge(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_int4ge(_int4, int4) returns bool
|
||||
create or replace function array_all_int4ge(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_int4lt(_int4, int4) returns bool
|
||||
create or replace function array_int4lt(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_int4lt(_int4, int4) returns bool
|
||||
create or replace function array_all_int4lt(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_int4le(_int4, int4) returns bool
|
||||
create or replace function array_int4le(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_int4le(_int4, int4) returns bool
|
||||
create or replace function array_all_int4le(_int4, int4) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
@ -231,11 +231,11 @@ create operator **<= (
|
||||
|
||||
-- define the array operators *=, **<> for type _oid (added tobias 1. 1999)
|
||||
--
|
||||
create function array_oideq(_oid, oid) returns bool
|
||||
create or replace function array_oideq(_oid, oid) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function array_all_oidne(_oid, oid) returns bool
|
||||
create or replace function array_all_oidne(_oid, oid) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
@ -249,5 +249,40 @@ create operator **<> (
|
||||
rightarg=oid,
|
||||
procedure=array_all_oidne);
|
||||
|
||||
-- define the array operators *=, **=, *<>, **<> for type _inet
|
||||
|
||||
-- end of file
|
||||
create or replace function array_ineteq(_inet, inet) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create or replace function array_all_ineteq(_inet, inet) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create or replace function array_inetne(_inet, inet) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create or replace function array_all_inetne(_inet, inet) returns bool
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create operator *= (
|
||||
leftarg=_inet,
|
||||
rightarg=inet,
|
||||
procedure=array_ineteq);
|
||||
|
||||
create operator **= (
|
||||
leftarg=_inet,
|
||||
rightarg=inet,
|
||||
procedure=array_all_ineteq);
|
||||
|
||||
create operator *<> (
|
||||
leftarg=_inet,
|
||||
rightarg=inet,
|
||||
procedure=array_inetne);
|
||||
|
||||
create operator **<> (
|
||||
leftarg=_inet,
|
||||
rightarg=inet,
|
||||
procedure=array_all_inetne);
|
||||
|
Reference in New Issue
Block a user