From 5cabcfccce4b8b826c9b30828f3012b7926a6946 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 26 Aug 2002 17:54:02 +0000 Subject: 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. --- src/backend/nodes/copyfuncs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/nodes/copyfuncs.c') diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 49af1f90c8..4de9ba5b8d 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.205 2002/08/24 15:00:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.206 2002/08/26 17:53:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1056,10 +1056,11 @@ _copyArrayRef(ArrayRef *from) /* * copy remainder of node */ + newnode->refrestype = from->refrestype; newnode->refattrlength = from->refattrlength; newnode->refelemlength = from->refelemlength; - newnode->refelemtype = from->refelemtype; newnode->refelembyval = from->refelembyval; + newnode->refelemalign = from->refelemalign; Node_Copy(from, newnode, refupperindexpr); Node_Copy(from, newnode, reflowerindexpr); -- cgit v1.2.1