mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +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:
@ -3,7 +3,7 @@
|
||||
* back to source text
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.117 2002/08/18 09:36:25 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.118 2002/08/26 17:53:58 tgl Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -725,7 +725,7 @@ decompile_column_index_array(Datum column_index_array, Oid relId,
|
||||
|
||||
/* Extract data from array of int16 */
|
||||
deconstruct_array(DatumGetArrayTypeP(column_index_array),
|
||||
true, 2, 's',
|
||||
INT2OID, 2, true, 's',
|
||||
&keys, &nKeys);
|
||||
|
||||
for (j = 0; j < nKeys; j++)
|
||||
|
Reference in New Issue
Block a user