1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Modify array operations to include array's element type OID in the

array header, and to compute sizing and alignment of array elements
the same way normal tuple access operations do --- viz, using the
tupmacs.h macros att_addlength and att_align.  This makes the world
safe for arrays of cstrings or intervals, and should make it much
easier to write array-type-polymorphic functions; as examples see
the cleanups of array_out and contrib/array_iterator.  By Joe Conway
and Tom Lane.
This commit is contained in:
Tom Lane
2002-08-26 17:54:02 +00:00
parent 8009c27592
commit 5cabcfccce
38 changed files with 559 additions and 435 deletions

View File

@ -4,19 +4,19 @@
--
create or replace function array_texteq(_text, text) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_texteq(_text, text) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_textregexeq(_text, text) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_textregexeq(_text, text) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create operator *= (
leftarg=_text,
@ -45,19 +45,19 @@ create operator **~ (
--
create or replace function array_varchareq(_varchar, varchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_varchareq(_varchar, varchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_varcharregexeq(_varchar, varchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_varcharregexeq(_varchar, varchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create operator *= (
leftarg=_varchar,
@ -84,19 +84,19 @@ create operator **~ (
--
create or replace function array_bpchareq(_bpchar, bpchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_bpchareq(_bpchar, bpchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_bpcharregexeq(_bpchar, bpchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_bpcharregexeq(_bpchar, bpchar) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create operator *= (
leftarg=_bpchar,
@ -123,51 +123,51 @@ create operator **~ (
--
create or replace function array_int4eq(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_int4eq(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_int4ne(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_int4ne(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_int4gt(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_int4gt(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_int4ge(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_int4ge(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_int4lt(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_int4lt(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_int4le(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_int4le(_int4, int4) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create operator *= (
leftarg=_int4,
@ -233,11 +233,11 @@ create operator **<= (
--
create or replace function array_oideq(_oid, oid) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_oidne(_oid, oid) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create operator *= (
leftarg=_oid,
@ -253,19 +253,19 @@ create operator **<> (
create or replace function array_ineteq(_inet, inet) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_ineteq(_inet, inet) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_inetne(_inet, inet) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create or replace function array_all_inetne(_inet, inet) returns bool
as 'MODULE_PATHNAME'
language 'c';
language C with (isStrict);
create operator *= (
leftarg=_inet,