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/utils/adt/acl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/adt/acl.c') diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 494a262f0bd..05493033d32 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.75 2002/08/09 16:45:14 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.76 2002/08/26 17:53:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -18,6 +18,7 @@ #include "catalog/namespace.h" #include "catalog/pg_shadow.h" +#include "catalog/pg_type.h" #include "commands/dbcommands.h" #include "miscadmin.h" #include "utils/acl.h" @@ -252,6 +253,7 @@ makeacl(int n) new_acl->size = size; new_acl->ndim = 1; new_acl->flags = 0; + new_acl->elemtype = ACLITEMOID; ARR_LBOUND(new_acl)[0] = 0; ARR_DIMS(new_acl)[0] = n; return new_acl; -- cgit v1.2.3