diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-08-26 17:54:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-08-26 17:54:02 +0000 |
commit | 5cabcfccce4b8b826c9b30828f3012b7926a6946 (patch) | |
tree | 3e14c0710a45b4195734dd3189eb89eac4969073 /contrib/array/README.array_iterator | |
parent | 8009c275925dda90f1275ba70f5c2a63abaa520b (diff) |
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.
Diffstat (limited to 'contrib/array/README.array_iterator')
-rw-r--r-- | contrib/array/README.array_iterator | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/array/README.array_iterator b/contrib/array/README.array_iterator index b072ebe3970..b9e037ed85a 100644 --- a/contrib/array/README.array_iterator +++ b/contrib/array/README.array_iterator @@ -41,9 +41,9 @@ attribute equal to a given value or matching a regular expression: The scheme is quite general, each operator which operates on a base type can be iterated over the elements of an array. It seem to work well but -defining each new operators requires writing a different C function. -Furthermore in each function there are two hardcoded OIDs which reference -a base type and a procedure. Not very portable. Can anyone suggest a -better and more portable way to do it ? +defining each new operator requires writing a different C function. +This is tedious, and error-prone since one must take care that the correct +datatypes are associated with the selected underlying function. +Can anyone suggest a better and more portable way to do it ? See also array_iterator.sql for an example on how to use this module. |