Commit f590ed12 authored by Tom Lane's avatar Tom Lane

Change pg_dump to use pg_roles instead of pg_user on 8.1 and up,

so that it will correctly dump owners of objects owned by non-login roles.
parent 840b7f52
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.117 2005/07/10 14:26:29 momjian Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.118 2005/08/15 02:36:30 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -97,7 +97,7 @@ typedef struct _dumpableObject ...@@ -97,7 +97,7 @@ typedef struct _dumpableObject
typedef struct _namespaceInfo typedef struct _namespaceInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *usename; /* name of owner, or empty string */ char *rolname; /* name of owner, or empty string */
char *nspacl; char *nspacl;
bool dump; /* true if need to dump definition */ bool dump; /* true if need to dump definition */
} NamespaceInfo; } NamespaceInfo;
...@@ -110,7 +110,7 @@ typedef struct _typeInfo ...@@ -110,7 +110,7 @@ typedef struct _typeInfo
* Note: dobj.name is the pg_type.typname entry. format_type() might * Note: dobj.name is the pg_type.typname entry. format_type() might
* produce something different than typname * produce something different than typname
*/ */
char *usename; /* name of owner, or empty string */ char *rolname; /* name of owner, or empty string */
Oid typinput; Oid typinput;
Oid typelem; Oid typelem;
Oid typrelid; Oid typrelid;
...@@ -126,7 +126,7 @@ typedef struct _typeInfo ...@@ -126,7 +126,7 @@ typedef struct _typeInfo
typedef struct _funcInfo typedef struct _funcInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *usename; /* name of owner, or empty string */ char *rolname; /* name of owner, or empty string */
Oid lang; Oid lang;
int nargs; int nargs;
Oid *argtypes; Oid *argtypes;
...@@ -146,20 +146,20 @@ typedef struct _aggInfo ...@@ -146,20 +146,20 @@ typedef struct _aggInfo
typedef struct _oprInfo typedef struct _oprInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *usename; char *rolname;
Oid oprcode; Oid oprcode;
} OprInfo; } OprInfo;
typedef struct _opclassInfo typedef struct _opclassInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *usename; char *rolname;
} OpclassInfo; } OpclassInfo;
typedef struct _convInfo typedef struct _convInfo
{ {
DumpableObject dobj; DumpableObject dobj;
char *usename; char *rolname;
} ConvInfo; } ConvInfo;
typedef struct _tableInfo typedef struct _tableInfo
...@@ -168,7 +168,7 @@ typedef struct _tableInfo ...@@ -168,7 +168,7 @@ typedef struct _tableInfo
* These fields are collected for every table in the database. * These fields are collected for every table in the database.
*/ */
DumpableObject dobj; DumpableObject dobj;
char *usename; /* name of owner, or empty string */ char *rolname; /* name of owner, or empty string */
char *relacl; char *relacl;
char relkind; char relkind;
char *reltablespace; /* relation tablespace */ char *reltablespace; /* relation tablespace */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment