Skip to content

Commit 83b0682

Browse files
committed
Move new typedef AclId into c.h, so as to avoid cluttering namespace
by having to include miscadmin.h into other header files.
1 parent 9df2c44 commit 83b0682

File tree

7 files changed

+14
-21
lines changed

7 files changed

+14
-21
lines changed

src/backend/tcop/fastpath.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.56 2003/01/07 22:32:10 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.57 2003/01/09 18:00:23 tgl Exp $
1212
*
1313
* NOTES
1414
* This cruft is the server side of PQfn.
@@ -64,6 +64,7 @@
6464
#include "catalog/pg_proc.h"
6565
#include "libpq/libpq.h"
6666
#include "libpq/pqformat.h"
67+
#include "miscadmin.h"
6768
#include "tcop/fastpath.h"
6869
#include "utils/acl.h"
6970
#include "utils/lsyscache.h"

src/include/c.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: c.h,v 1.134 2002/12/16 16:22:46 tgl Exp $
15+
* $Id: c.h,v 1.135 2003/01/09 18:00:24 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -358,7 +358,7 @@ typedef float float4;
358358
typedef double float8;
359359

360360
/*
361-
* Oid, RegProcedure, TransactionId, CommandId
361+
* Oid, RegProcedure, TransactionId, CommandId, AclId
362362
*/
363363

364364
/* typedef Oid is in postgres_ext.h */
@@ -376,6 +376,8 @@ typedef uint32 CommandId;
376376

377377
#define FirstCommandId ((CommandId) 0)
378378

379+
typedef int32 AclId; /* user and group identifiers */
380+
379381
/*
380382
* Array indexing support
381383
*/

src/include/catalog/pg_conversion.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: pg_conversion.h,v 1.8 2002/12/04 05:18:35 momjian Exp $
11+
* $Id: pg_conversion.h,v 1.9 2003/01/09 18:00:24 tgl Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -19,8 +19,6 @@
1919
#ifndef PG_CONVERSION_H
2020
#define PG_CONVERSION_H
2121

22-
#include "miscadmin.h"
23-
2422
/* ----------------
2523
* postgres.h contains the system type definitions and the
2624
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file

src/include/commands/typecmds.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: typecmds.h,v 1.3 2003/01/06 00:31:44 tgl Exp $
10+
* $Id: typecmds.h,v 1.4 2003/01/09 18:00:24 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#ifndef TYPECMDS_H
1515
#define TYPECMDS_H
1616

17-
#include "miscadmin.h"
1817
#include "nodes/parsenodes.h"
1918

2019

src/include/miscadmin.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: miscadmin.h,v 1.114 2002/12/09 18:21:43 tgl Exp $
15+
* $Id: miscadmin.h,v 1.115 2003/01/09 18:00:24 tgl Exp $
1616
*
1717
* NOTES
1818
* some of the information in this file should be moved to
@@ -176,7 +176,7 @@ extern bool EnableSSL;
176176
extern bool SilentMode;
177177
extern int MaxBackends;
178178
extern int ReservedBackends;
179-
extern int NBuffers;
179+
extern DLLIMPORT int NBuffers;
180180
extern int PostPortNumber;
181181
extern int Unix_socket_permissions;
182182
extern char *Unix_socket_group;
@@ -200,13 +200,7 @@ extern char *ExpandDatabasePath(const char *path);
200200
extern void SetDatabaseName(const char *name);
201201
extern void SetDatabasePath(const char *path);
202202

203-
/*
204-
* AclId system identifier for the user, group, etc.
205-
*/
206-
typedef int32 AclId;
207-
208203
extern char *GetUserNameFromId(AclId userid);
209-
210204
extern AclId GetUserId(void);
211205
extern void SetUserId(AclId userid);
212206
extern AclId GetSessionUserId(void);

src/include/pgstat.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
*
66
* Copyright (c) 2001, PostgreSQL Global Development Group
77
*
8-
* $Id: pgstat.h,v 1.11 2002/12/05 04:04:51 momjian Exp $
8+
* $Id: pgstat.h,v 1.12 2003/01/09 18:00:24 tgl Exp $
99
* ----------
1010
*/
1111
#ifndef PGSTAT_H
1212
#define PGSTAT_H
1313

14-
#include "miscadmin.h"
15-
1614
/* ----------
1715
* Paths for the statistics files. The %s is replaced with the
1816
* installations $PGDATA.

src/include/utils/acl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: acl.h,v 1.49 2002/12/05 04:04:51 momjian Exp $
10+
* $Id: acl.h,v 1.50 2003/01/09 18:00:24 tgl Exp $
1111
*
1212
* NOTES
1313
* For backward-compatibility purposes we have to allow there
@@ -22,11 +22,12 @@
2222
#ifndef ACL_H
2323
#define ACL_H
2424

25-
#include "miscadmin.h"
2625
#include "nodes/parsenodes.h"
2726
#include "utils/array.h"
2827

2928

29+
/* typedef AclId is declared in c.h */
30+
3031
#define ACL_ID_WORLD 0 /* placeholder for id in a WORLD acl item */
3132

3233
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy