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 /src/backend/parser/parse_expr.c | |
parent | 8009c275925dda90f1275ba70f5c2a63abaa520b (diff) | |
download | postgresql-5cabcfccce4b8b826c9b30828f3012b7926a6946.tar.gz postgresql-5cabcfccce4b8b826c9b30828f3012b7926a6946.zip |
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 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 85cdc431a0e..1a7acd22527 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.125 2002/08/08 01:44:30 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.126 2002/08/26 17:53:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -877,7 +877,7 @@ exprType(Node *expr) type = ((Const *) expr)->consttype; break; case T_ArrayRef: - type = ((ArrayRef *) expr)->refelemtype; + type = ((ArrayRef *) expr)->refrestype; break; case T_Aggref: type = ((Aggref *) expr)->aggtype; |