aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-08-06 18:05:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-08-06 18:05:49 +0000
commit7f018ac1c21bf1c41e692f7097a1f29f3ad7fe1c (patch)
tree3ad7f6779fd5b471e6df2a92e112c69c5fa3b90e
parent57050f9bdf13fd93f534d6c97a33499be0242a40 (diff)
downloadpostgresql-7f018ac1c21bf1c41e692f7097a1f29f3ad7fe1c.tar.gz
postgresql-7f018ac1c21bf1c41e692f7097a1f29f3ad7fe1c.zip
Use one, not zero, as the default lower bound for arrays of AclItems.
This avoids changing the displayed appearance of ACL columns now that array_out decorates its output with bounds information when the lower bound isn't one. Per gripe from Gaetano Mendola. Note that I did not force initdb for this, although any database initdb'd in the last couple of days is going to have some problems.
-rw-r--r--src/backend/utils/adt/acl.c4
-rw-r--r--src/include/utils/acl.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 290c3ed49d2..4464579857a 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.108 2004/08/01 20:30:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.109 2004/08/06 18:05:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -328,7 +328,7 @@ allocacl(int n)
new_acl->ndim = 1;
new_acl->flags = 0;
new_acl->elemtype = ACLITEMOID;
- ARR_LBOUND(new_acl)[0] = 0;
+ ARR_LBOUND(new_acl)[0] = 1;
ARR_DIMS(new_acl)[0] = n;
return new_acl;
}
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index cf13038ad00..7ed019c7a35 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.72 2004/08/01 20:30:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.73 2004/08/06 18:05:49 tgl Exp $
*
* NOTES
* An ACL array is simply an array of AclItems, representing the union
@@ -99,7 +99,7 @@ typedef struct AclItem
* Definitions for convenient access to Acl (array of AclItem) and IdList
* (array of AclId). These are standard PostgreSQL arrays, but are restricted
* to have one dimension. We also ignore the lower bound when reading,
- * and set it to zero when writing.
+ * and set it to one when writing.
*
* CAUTION: as of PostgreSQL 7.1, these arrays are toastable (just like all
* other array types). Therefore, be careful to detoast them with the