Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 79c8d2e

Browse files
committed
Change owner from oid to int4 type.
1 parent 8ed36c3 commit 79c8d2e

File tree

20 files changed

+83
-91
lines changed

20 files changed

+83
-91
lines changed

contrib/findoidjoins/README

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,30 @@ Run on am empty database, it returns the system join relationships:
1313

1414
---------------------------------------------------------------------------
1515

16-
Join pg_aggregate.aggbasetype => pg_proc.oid
17-
Join pg_aggregate.aggbasetype => pg_type.oid
18-
Join pg_aggregate.aggfinalfn => pg_proc.oid
19-
Join pg_aggregate.aggfinaltype => pg_proc.oid
20-
Join pg_aggregate.aggfinaltype => pg_type.oid
21-
Join pg_aggregate.aggowner => pg_proc.oid
2216
Join pg_aggregate.aggtransfn1 => pg_proc.oid
2317
Join pg_aggregate.aggtransfn2 => pg_proc.oid
18+
Join pg_aggregate.aggfinalfn => pg_proc.oid
19+
Join pg_aggregate.aggbasetype => pg_proc.oid
20+
Join pg_aggregate.aggbasetype => pg_type.oid
2421
Join pg_aggregate.aggtranstype1 => pg_proc.oid
2522
Join pg_aggregate.aggtranstype1 => pg_type.oid
2623
Join pg_aggregate.aggtranstype2 => pg_type.oid
27-
Join pg_am.ambeginscan => pg_proc.oid
28-
Join pg_am.ambuild => pg_proc.oid
29-
Join pg_am.amdelete => pg_proc.oid
30-
Join pg_am.amendscan => pg_proc.oid
24+
Join pg_aggregate.aggfinaltype => pg_proc.oid
25+
Join pg_aggregate.aggfinaltype => pg_type.oid
3126
Join pg_am.amgettuple => pg_proc.oid
3227
Join pg_am.aminsert => pg_proc.oid
33-
Join pg_am.ammarkpos => pg_proc.oid
34-
Join pg_am.amowner => pg_proc.oid
28+
Join pg_am.amdelete => pg_proc.oid
29+
Join pg_am.ambeginscan => pg_proc.oid
3530
Join pg_am.amrescan => pg_proc.oid
31+
Join pg_am.amendscan => pg_proc.oid
32+
Join pg_am.ammarkpos => pg_proc.oid
3633
Join pg_am.amrestrpos => pg_proc.oid
37-
Join pg_amop.amopclaid => pg_opclass.oid
34+
Join pg_am.ambuild => pg_proc.oid
3835
Join pg_amop.amopid => pg_am.oid
39-
Join pg_amop.amopnpages => pg_proc.oid
36+
Join pg_amop.amopclaid => pg_opclass.oid
4037
Join pg_amop.amopopr => pg_operator.oid
4138
Join pg_amop.amopselect => pg_proc.oid
39+
Join pg_amop.amopnpages => pg_proc.oid
4240
Join pg_amproc.amid => pg_am.oid
4341
Join pg_amproc.amopclaid => pg_opclass.oid
4442
Join pg_amproc.amopclaid => pg_operator.oid
@@ -47,42 +45,37 @@ Join pg_amproc.amproc => pg_operator.oid
4745
Join pg_amproc.amproc => pg_proc.oid
4846
Join pg_attribute.attrelid => pg_class.oid
4947
Join pg_attribute.atttypid => pg_type.oid
50-
Join pg_class.relam => pg_am.oid
51-
Join pg_class.relowner => pg_proc.oid
5248
Join pg_class.reltype => pg_type.oid
49+
Join pg_class.relam => pg_am.oid
5350
Join pg_description.objoid => pg_proc.oid
5451
Join pg_description.objoid => pg_type.oid
5552
Join pg_index.indexrelid => pg_class.oid
56-
Join pg_index.indproc => pg_proc.oid
5753
Join pg_index.indrelid => pg_class.oid
54+
Join pg_index.indproc => pg_proc.oid
5855
Join pg_opclass.opcdeftype => pg_type.oid
59-
Join pg_operator.oprcode => pg_proc.oid
60-
Join pg_operator.oprcom => pg_operator.oid
61-
Join pg_operator.oprjoin => pg_proc.oid
6256
Join pg_operator.oprleft => pg_type.oid
63-
Join pg_operator.oprlsortop => pg_operator.oid
64-
Join pg_operator.oprnegate => pg_operator.oid
65-
Join pg_operator.oprowner => pg_proc.oid
66-
Join pg_operator.oprrest => pg_proc.oid
67-
Join pg_operator.oprresult => pg_type.oid
6857
Join pg_operator.oprright => pg_type.oid
58+
Join pg_operator.oprresult => pg_type.oid
59+
Join pg_operator.oprcom => pg_operator.oid
60+
Join pg_operator.oprnegate => pg_operator.oid
61+
Join pg_operator.oprlsortop => pg_operator.oid
6962
Join pg_operator.oprrsortop => pg_operator.oid
63+
Join pg_operator.oprcode => pg_proc.oid
64+
Join pg_operator.oprrest => pg_proc.oid
65+
Join pg_operator.oprjoin => pg_proc.oid
7066
Join pg_parg.parproid => pg_operator.oid
7167
Join pg_parg.parproid => pg_proc.oid
7268
Join pg_parg.partype => pg_type.oid
7369
Join pg_proc.prolang => pg_language.oid
74-
Join pg_proc.proowner => pg_proc.oid
7570
Join pg_proc.prorettype => pg_type.oid
7671
Join pg_rewrite.ev_class => pg_class.oid
77-
Join pg_statistic.starelid => pg_class.oid
72+
Join pg_type.typrelid => pg_class.oid
7873
Join pg_type.typelem => pg_operator.oid
7974
Join pg_type.typelem => pg_proc.oid
8075
Join pg_type.typelem => pg_type.oid
8176
Join pg_type.typinput => pg_proc.oid
8277
Join pg_type.typoutput => pg_proc.oid
83-
Join pg_type.typowner => pg_proc.oid
8478
Join pg_type.typreceive => pg_proc.oid
85-
Join pg_type.typrelid => pg_class.oid
8679
Join pg_type.typsend => pg_proc.oid
8780

8881

contrib/findoidjoins/findoidjoins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ main(int argc, char **argv)
3939
typname = 'regproc') AND \
4040
a.attrelid = c.oid AND \
4141
a.atttypid = t.oid \
42-
ORDER BY 2, 3; \
42+
ORDER BY 2, a.attnum ; \
4343
");
4444
doquery("FETCH ALL IN c_attributes");
4545
attres = get_result();

src/backend/catalog/aclchk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.12 1998/07/27 19:37:45 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.13 1998/08/11 18:28:11 momjian Exp $
1111
*
1212
* NOTES
1313
* See acl.h.
@@ -455,14 +455,14 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
455455
* if the acl is null, by default the owner can do whatever he
456456
* wants to with it
457457
*/
458-
Oid ownerId;
458+
int4 ownerId;
459459

460460
relation = heap_openr(RelationRelationName);
461-
ownerId = (Oid) heap_getattr(htp,
461+
ownerId = (int4) heap_getattr(htp,
462462
Anum_pg_class_relowner,
463463
RelationGetTupleDescriptor(relation),
464464
(bool *) NULL);
465-
acl = aclownerdefault(relname, ownerId);
465+
acl = aclownerdefault(relname, (AclId)ownerId);
466466
}
467467
#else
468468
{ /* This is why the syscache is great... */

src/backend/commands/dbcommands.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.18 1998/07/27 19:37:52 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.19 1998/08/11 18:28:13 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -38,7 +38,7 @@
3838
/* non-export function prototypes */
3939
static void
4040
check_permissions(char *command, char *dbpath, char *dbname,
41-
Oid *dbIdP, Oid *userIdP);
41+
Oid *dbIdP, int4 *userIdP);
4242
static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel);
4343
static void stop_vacuum(char *dbpath, char *dbname);
4444

@@ -191,12 +191,12 @@ check_permissions(char *command,
191191
char *dbpath,
192192
char *dbname,
193193
Oid *dbIdP,
194-
Oid *userIdP)
194+
int4 *userIdP)
195195
{
196196
Relation dbrel;
197197
HeapTuple dbtup,
198198
utup;
199-
Oid dbowner = (Oid) 0;
199+
int4 dbowner = 0;
200200
char use_createdb;
201201
bool dbfound;
202202
bool use_super;
@@ -250,7 +250,7 @@ check_permissions(char *command,
250250

251251
if (dbfound)
252252
{
253-
dbowner = (Oid) heap_getattr(dbtup,
253+
dbowner = (int4) heap_getattr(dbtup,
254254
Anum_pg_database_datdba,
255255
RelationGetTupleDescriptor(dbrel),
256256
(char *) NULL);

src/backend/storage/smgr/md.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.35 1998/07/26 04:30:44 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.36 1998/08/11 18:28:15 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -565,8 +565,8 @@ mdblindwrt(char *dbstr,
565565
/* this is work arround only !!! */
566566
{
567567
char dbpath[MAXPGPATH + 1];
568-
Oid owner,
569-
id;
568+
int4 owner;
569+
Oid id;
570570
char *tmpPath;
571571
#ifdef MULTIBYTE
572572
int tmpEncoding;
@@ -610,8 +610,8 @@ mdblindwrt(char *dbstr,
610610
/* this is work arround only !!! */
611611
{
612612
char dbpath[MAXPGPATH + 1];
613-
Oid owner,
614-
id;
613+
int4 owner;
614+
Oid id;
615615
char *tmpPath;
616616

617617
#ifdef MULTIBYTE

src/backend/utils/cache/lsyscache.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.17 1998/08/11 14:32:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.18 1998/08/11 18:28:18 momjian Exp $
1111
*
1212
* NOTES
1313
* Eventually, the index information should go through here, too.
@@ -50,7 +50,7 @@ op_class(Oid oprno, int32 opclass, Oid amopid)
5050
if (SearchSysCacheStruct(AMOPOPID,
5151
(char *) &amoptup,
5252
ObjectIdGetDatum(opclass),
53-
ObjectIdGetDatum(opno),
53+
ObjectIdGetDatum(oprno),
5454
ObjectIdGetDatum(amopid),
5555
0))
5656
return true;
@@ -245,7 +245,6 @@ op_mergejoinable(Oid opno, Oid ltype, Oid rtype, Oid *leftOp, Oid *rightOp)
245245
optup.oprleft == ltype &&
246246
optup.oprright == rtype)
247247
{
248-
249248
*leftOp = ObjectIdGetDatum(optup.oprlsortop);
250249
*rightOp = ObjectIdGetDatum(optup.oprrsortop);
251250
return TRUE;

src/backend/utils/cache/relcache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.45 1998/08/01 15:26:29 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.46 1998/08/11 18:28:22 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1063,7 +1063,7 @@ formrdesc(char *relationName,
10631063
}
10641064
else
10651065
{
1066-
relation->rd_rel->relowner = InvalidOid; /* XXX incorrect */
1066+
relation->rd_rel->relowner = 0;
10671067
relation->rd_rel->relisshared = false;
10681068
}
10691069

src/backend/utils/init/miscinit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.18 1998/07/26 04:31:01 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.19 1998/08/11 18:28:25 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -442,7 +442,7 @@ SetPgUserName()
442442
*/
443443
static Oid UserId = InvalidOid;
444444

445-
Oid
445+
int
446446
GetUserId()
447447
{
448448
Assert(OidIsValid(UserId));

src/backend/utils/init/postinit.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.32 1998/07/26 04:31:01 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.33 1998/08/11 18:28:28 momjian Exp $
1111
*
1212
* NOTES
1313
* InitPostgres() is the function called from PostgresMain
@@ -84,9 +84,9 @@ static void InitUserid(void);
8484

8585
extern char *ExpandDatabasePath(char *name);
8686
#ifdef MULTIBYTE
87-
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding);
87+
extern void GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encoding);
8888
#else
89-
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path);
89+
extern void GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path);
9090
#endif
9191

9292
static IPCKey PostgresIpcKey;
@@ -125,7 +125,7 @@ static IPCKey PostgresIpcKey;
125125
static void
126126
InitMyDatabaseInfo(char *name)
127127
{
128-
Oid owner;
128+
int4 owner;
129129
char *path,
130130
myPath[MAXPGPATH + 1];
131131
#ifdef MULTIBYTE

src/backend/utils/misc/database.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.14 1998/07/27 19:38:26 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.15 1998/08/11 18:28:30 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -35,7 +35,7 @@
3535
* Pull database information from pg_database.
3636
*/
3737
int
38-
GetDatabaseInfo(char *name, Oid *owner, char *path)
38+
GetDatabaseInfo(char *name, int4 *owner, char *path)
3939
{
4040
Oid dbowner,
4141
dbid;
@@ -179,7 +179,7 @@ ExpandDatabasePath(char *dbpath)
179179
* --------------------------------
180180
*/
181181
void
182-
GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path)
182+
GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path)
183183
{
184184
int dbfd;
185185
int fileflags;

src/include/catalog/pg_aggregate.h

Lines changed: 2 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_aggregate.h,v 1.15 1998/07/08 14:08:58 thomas Exp $
10+
* $Id: pg_aggregate.h,v 1.16 1998/08/11 18:28:36 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -45,7 +45,7 @@
4545
CATALOG(pg_aggregate)
4646
{
4747
NameData aggname;
48-
Oid aggowner;
48+
int4 aggowner;
4949
regproc aggtransfn1;
5050
regproc aggtransfn2;
5151
regproc aggfinalfn;

src/include/catalog/pg_am.h

Lines changed: 2 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_am.h,v 1.6 1998/08/11 05:32:43 momjian Exp $
10+
* $Id: pg_am.h,v 1.7 1998/08/11 18:28:37 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -36,7 +36,7 @@
3636
CATALOG(pg_am)
3737
{
3838
NameData amname;
39-
Oid amowner;
39+
int4 amowner;
4040
char amkind;
4141
int2 amstrategies;
4242
int2 amsupport;

0 commit comments

Comments
 (0)