1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Make usesysid consistently int4, not oid.

Catalog patch from Alvaro Herrera for same.

catversion updated. initdb required.
This commit is contained in:
Bruce Momjian
2002-12-04 05:18:38 +00:00
parent 91f508ae85
commit 93902e9521
11 changed files with 45 additions and 42 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.78 2002/09/24 23:14:25 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.79 2002/12/04 05:18:31 momjian Exp $
*
* NOTES
* See acl.h.
@@ -893,7 +893,7 @@ aclcheck_error(AclResult errcode, const char *objectname)
* Exported routine for checking a user's access privileges to a table
*/
AclResult
pg_class_aclcheck(Oid table_oid, Oid userid, AclMode mode)
pg_class_aclcheck(Oid table_oid, AclId userid, AclMode mode)
{
AclResult result;
bool usesuper,
@@ -991,7 +991,7 @@ pg_class_aclcheck(Oid table_oid, Oid userid, AclMode mode)
* Exported routine for checking a user's access privileges to a database
*/
AclResult
pg_database_aclcheck(Oid db_oid, Oid userid, AclMode mode)
pg_database_aclcheck(Oid db_oid, AclId userid, AclMode mode)
{
AclResult result;
Relation pg_database;
@@ -1054,7 +1054,7 @@ pg_database_aclcheck(Oid db_oid, Oid userid, AclMode mode)
* Exported routine for checking a user's access privileges to a function
*/
AclResult
pg_proc_aclcheck(Oid proc_oid, Oid userid, AclMode mode)
pg_proc_aclcheck(Oid proc_oid, AclId userid, AclMode mode)
{
AclResult result;
HeapTuple tuple;
@@ -1107,7 +1107,7 @@ pg_proc_aclcheck(Oid proc_oid, Oid userid, AclMode mode)
* Exported routine for checking a user's access privileges to a language
*/
AclResult
pg_language_aclcheck(Oid lang_oid, Oid userid, AclMode mode)
pg_language_aclcheck(Oid lang_oid, AclId userid, AclMode mode)
{
AclResult result;
HeapTuple tuple;
@@ -1157,7 +1157,7 @@ pg_language_aclcheck(Oid lang_oid, Oid userid, AclMode mode)
* Exported routine for checking a user's access privileges to a namespace
*/
AclResult
pg_namespace_aclcheck(Oid nsp_oid, Oid userid, AclMode mode)
pg_namespace_aclcheck(Oid nsp_oid, AclId userid, AclMode mode)
{
AclResult result;
HeapTuple tuple;
@@ -1218,7 +1218,7 @@ pg_namespace_aclcheck(Oid nsp_oid, Oid userid, AclMode mode)
* Ownership check for a relation (specified by OID).
*/
bool
pg_class_ownercheck(Oid class_oid, Oid userid)
pg_class_ownercheck(Oid class_oid, AclId userid)
{
HeapTuple tuple;
AclId owner_id;
@@ -1244,7 +1244,7 @@ pg_class_ownercheck(Oid class_oid, Oid userid)
* Ownership check for a type (specified by OID).
*/
bool
pg_type_ownercheck(Oid type_oid, Oid userid)
pg_type_ownercheck(Oid type_oid, AclId userid)
{
HeapTuple tuple;
AclId owner_id;
@@ -1270,7 +1270,7 @@ pg_type_ownercheck(Oid type_oid, Oid userid)
* Ownership check for an operator (specified by OID).
*/
bool
pg_oper_ownercheck(Oid oper_oid, Oid userid)
pg_oper_ownercheck(Oid oper_oid, AclId userid)
{
HeapTuple tuple;
AclId owner_id;
@@ -1296,7 +1296,7 @@ pg_oper_ownercheck(Oid oper_oid, Oid userid)
* Ownership check for a function (specified by OID).
*/
bool
pg_proc_ownercheck(Oid proc_oid, Oid userid)
pg_proc_ownercheck(Oid proc_oid, AclId userid)
{
HeapTuple tuple;
AclId owner_id;
@@ -1322,7 +1322,7 @@ pg_proc_ownercheck(Oid proc_oid, Oid userid)
* Ownership check for a namespace (specified by OID).
*/
bool
pg_namespace_ownercheck(Oid nsp_oid, Oid userid)
pg_namespace_ownercheck(Oid nsp_oid, AclId userid)
{
HeapTuple tuple;
AclId owner_id;
@@ -1349,7 +1349,7 @@ pg_namespace_ownercheck(Oid nsp_oid, Oid userid)
* Ownership check for an operator class (specified by OID).
*/
bool
pg_opclass_ownercheck(Oid opc_oid, Oid userid)
pg_opclass_ownercheck(Oid opc_oid, AclId userid)
{
HeapTuple tuple;
AclId owner_id;

View File

@@ -13,7 +13,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.40 2002/11/11 22:19:21 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.41 2002/12/04 05:18:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1365,7 +1365,7 @@ FindDefaultConversionProc(int4 for_encoding, int4 to_encoding)
static void
recomputeNamespacePath(void)
{
Oid userId = GetUserId();
AclId userId = GetUserId();
char *rawname;
List *namelist;
List *oidlist;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_conversion.c,v 1.8 2002/11/02 18:41:21 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_conversion.c,v 1.9 2002/12/04 05:18:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,7 +37,7 @@
*/
Oid
ConversionCreate(const char *conname, Oid connamespace,
int32 conowner,
AclId conowner,
int32 conforencoding, int32 contoencoding,
Oid conproc, bool def)
{

View File

@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.97 2002/11/23 18:26:45 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.98 2002/12/04 05:18:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -804,11 +804,11 @@ check_cluster_ownership(Oid relOid)
/* Get a list of tables that the current user owns and
* have indisclustered set. Return the list in a List * of rvsToCluster
* with the tableOid and the indexOid on which the table is already
* with the tableOid and the indexOid on which the table is already
* clustered.
*/
List *
get_tables_to_cluster(Oid owner)
get_tables_to_cluster(AclId owner)
{
Relation indRelation;
HeapScanDesc scan;

View File

@@ -272,7 +272,7 @@ pg_stat_get_backend_userid(PG_FUNCTION_ARGS)
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
PG_RETURN_NULL();
PG_RETURN_OID(beentry->userid);
PG_RETURN_INT32(beentry->userid);
}