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

Commit296efd8

Browse files
committed
Fix for ACL length problem on different platforms.
1 parent46db8ac commit296efd8

File tree

4 files changed

+33
-17
lines changed

4 files changed

+33
-17
lines changed

‎doc/TODO

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PARSER
2929
* Select a[1] FROM test fails, it needs test.a[1]
3030
* Array index references without table name cause problems
3131
* Update table SET table.value = 3 fails
32-
* Creating index of TIMESTAMP & RELTIME fails, rename to DATETIME(Thomas)
32+
* Creating index of TIMESTAMP & RELTIME fails,orrename to DATETIME(Thomas)
3333
* SELECT foo UNION SELECT foo is incorrectly simplified to SELECT foo
3434
* INSERT ... SELECT ... GROUP BY groups by target columns not source columns
3535
* CREATE TABLE test (a char(5) DEFAULT text '', b int4) fails on INSERT
@@ -50,18 +50,11 @@ ENHANCEMENTS
5050

5151
URGENT
5252

53-
* Add referential integrity
54-
* Add OUTER joins, left and right(Thomas)
53+
* Add referential integrity(Jan?)
54+
* Add OUTER joins, left and right(Thomas, Bruce)
5555
* Allow long tuples by chaining or auto-storing outside db (chaining,large objs)
5656
* Eliminate limits on query length
57-
* Fix memory leak for expressions?, aggregates?
58-
59-
EXOTIC FEATURES
60-
61-
* Add sql3 recursive unions
62-
* Add the concept of dataspaces
63-
* Add replication of distributed databases
64-
* Allow queries across multiple databases
57+
* Fix memory leak for expressions?, aggregates?(Tom?)
6558

6659
ADMIN
6760

@@ -85,6 +78,7 @@ TYPES
8578
o Allow large text type to use large objects(Peter)
8679
o Not to stuff everything as files in a single directory, hash dirs
8780
o Allow large object vacuuming
81+
o Tables that start with xinv confused to be large objects
8882
* Allow pg_descriptions when creating types, tables, columns, and functions
8983
* Add IPv6 capability to INET/CIDR types
9084
* Make a separate SERIAL type?
@@ -129,6 +123,7 @@ COMMANDS
129123
* Rewrite the LIKE handling by rewriting the user string with the
130124
supplied ESCAPE
131125
* Move LIKE index optimization handling to the optimizer
126+
* Allow RULE recomplation
132127

133128
CLIENTS
134129

@@ -141,6 +136,13 @@ CLIENTS
141136
* Allow psql to print nulls as distinct from ""(?)
142137
* PQrequestCancel() be able to terminate backend waiting for lock
143138

139+
EXOTIC FEATURES
140+
141+
* Add sql3 recursive unions
142+
* Add the concept of dataspaces
143+
* Add replication of distributed databases
144+
* Allow queries across multiple databases
145+
144146
MISC
145147

146148
* Increase identifier length(NAMEDATALEN) if small performance hit
@@ -167,8 +169,8 @@ MISC
167169
* Missing optimizer selectivities for date, r-tree, etc.
168170
* Overhaul mdmgr/smgr to fix double unlinking and double opens, cleanup
169171
* Overhaul bufmgr/lockmgr/transaction manager
170-
* Tables that start with xinv confused to be large objects
171172
* Add PL/Perl(Mark Hollomon)
173+
* Make postgres user have a password by default
172174

173175

174176
PERFORMANCE
@@ -223,7 +225,7 @@ MISC
223225
* improve dynamic memory allocation by introducing tuple-context memory
224226
allocation
225227
* fix memory leak in cache code when non-existant table is referenced
226-
* In WHERE x=3 ANDx=y, add y=3
228+
* In WHEREtab1.x=3 ANDtab1.x=tab2.y, addtab2.y=3
227229
* pass atttypmod through parser in more cases(Bruce)
228230
* remove duplicate type in/out functions for disk and net
229231

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.36 1999/05/25 16:11:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.37 1999/07/09 03:28:51 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -20,6 +20,7 @@
2020
#include"utils/syscache.h"
2121
#include"catalog/catalog.h"
2222
#include"catalog/pg_shadow.h"
23+
#include"catalog/pg_type.h"
2324
#include"miscadmin.h"
2425

2526
staticchar*getid(char*s,char*n);
@@ -682,6 +683,9 @@ makeAclStmt(char *privileges, List *rel_list, char *grantee,
682683
ChangeACLStmt*n=makeNode(ChangeACLStmt);
683684
charstr[MAX_PARSE_BUFFER];
684685

686+
/* see comment in pg_type.h */
687+
Assert(ACLITEMSIZE==sizeof(AclItem));
688+
685689
n->aclitem= (AclItem*)palloc(sizeof(AclItem));
686690

687691
/* the grantee string is "G <group_name>", "U <user_name>", or "ALL" */

‎src/include/catalog/pg_type.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_type.h,v 1.62 1999/05/25 16:13:48 momjian Exp $
10+
* $Id: pg_type.h,v 1.63 1999/07/09 03:28:52 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -341,7 +341,12 @@ DATA(insert OID = 1024 ( _reltime PGUID -1 -1 f b t \054 0 703 array_in array
341341
DATA(insertOID=1025 (_tintervalPGUID-1-1fbt \0540704array_inarray_outarray_inarray_outi_null_ ));
342342
DATA(insertOID=1026 (_filenamePGUID-1-1fbt \0540605array_inarray_outarray_inarray_outi_null_ ));
343343
DATA(insertOID=1027 (_polygonPGUID-1-1fbt \0540604array_inarray_outarray_inarray_outd_null_ ));
344-
/* Note: the size of an aclitem needs to match sizeof(AclItem) in acl.h */
344+
/*
345+
*Note: the size of aclitem needs to match sizeof(AclItem) in acl.h.
346+
*Thanks to some padding, this will be 8 on all platforms.
347+
*We also have an Assert to make sure.
348+
*/
349+
#defineACLITEMSIZE8
345350
DATA(insertOID=1033 (aclitemPGUID8-1fbt \05400acliteminaclitemoutacliteminaclitemouti_null_ ));
346351
DESCR("access control list");
347352
DATA(insertOID=1034 (_aclitemPGUID-1-1fbt \05401033array_inarray_outarray_inarray_outi_null_ ));

‎src/include/utils/acl.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: acl.h,v 1.19 1999/02/13 23:22:14 momjian Exp $
9+
* $Id: acl.h,v 1.20 1999/07/09 03:28:53 momjian Exp $
1010
*
1111
* NOTES
1212
* For backward-compatability purposes we have to allow there
@@ -74,6 +74,11 @@ typedef struct AclItem
7474
AclIdai_id;
7575
AclIdTypeai_idtype;
7676
AclModeai_mode;
77+
/*
78+
*This is actually type 'aclitem', and we want a fixed size for
79+
*for all platforms, so we pad this with dummies.
80+
*/
81+
chardummy1,dummy2;
7782
}AclItem;
7883

7984
/* Note: if the size of AclItem changes,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp