Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f018ac

Browse files
committed
Use one, not zero, as the default lower bound for arrays of AclItems.
This avoids changing the displayed appearance of ACL columns now thatarray_out decorates its output with bounds information when the lowerbound isn't one. Per gripe from Gaetano Mendola. Note that I did notforce initdb for this, although any database initdb'd in the lastcouple of days is going to have some problems.
1 parent57050f9 commit7f018ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/backend/utils/adt/acl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.108 2004/08/01 20:30:49 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.109 2004/08/06 18:05:48 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -328,7 +328,7 @@ allocacl(int n)
328328
new_acl->ndim=1;
329329
new_acl->flags=0;
330330
new_acl->elemtype=ACLITEMOID;
331-
ARR_LBOUND(new_acl)[0]=0;
331+
ARR_LBOUND(new_acl)[0]=1;
332332
ARR_DIMS(new_acl)[0]=n;
333333
returnnew_acl;
334334
}

‎src/include/utils/acl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.72 2004/08/01 20:30:49 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.73 2004/08/06 18:05:49 tgl Exp $
1111
*
1212
* NOTES
1313
* An ACL array is simply an array of AclItems, representing the union
@@ -99,7 +99,7 @@ typedef struct AclItem
9999
* Definitions for convenient access to Acl (array of AclItem) and IdList
100100
* (array of AclId). These are standard PostgreSQL arrays, but are restricted
101101
* to have one dimension. We also ignore the lower bound when reading,
102-
* and set it tozero when writing.
102+
* and set it toone when writing.
103103
*
104104
* CAUTION: as of PostgreSQL 7.1, these arrays are toastable (just like all
105105
* other array types).Therefore, be careful to detoast them with the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp