Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
37995812
Commit
37995812
authored
Jan 23, 2007
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pg_dump to support dumping operator families.
parent
867c1335
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
411 additions
and
15 deletions
+411
-15
src/bin/pg_dump/common.c
src/bin/pg_dump/common.c
+7
-1
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.c
+4
-2
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+383
-10
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump.h
+9
-1
src/bin/pg_dump/pg_dump_sort.c
src/bin/pg_dump/pg_dump_sort.c
+8
-1
No files found.
src/bin/pg_dump/common.c
View file @
37995812
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.9
5 2007/01/05 22:19:48 momjian
Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.9
6 2007/01/23 17:54:50 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -77,6 +77,7 @@ getSchemaData(int *numTablesPtr)
ProcLangInfo
*
proclanginfo
;
CastInfo
*
castinfo
;
OpclassInfo
*
opcinfo
;
OpfamilyInfo
*
opfinfo
;
ConvInfo
*
convinfo
;
int
numNamespaces
;
int
numAggregates
;
...
...
@@ -85,6 +86,7 @@ getSchemaData(int *numTablesPtr)
int
numProcLangs
;
int
numCasts
;
int
numOpclasses
;
int
numOpfamilies
;
int
numConversions
;
if
(
g_verbose
)
...
...
@@ -117,6 +119,10 @@ getSchemaData(int *numTablesPtr)
write_msg
(
NULL
,
"reading user-defined operator classes
\n
"
);
opcinfo
=
getOpclasses
(
&
numOpclasses
);
if
(
g_verbose
)
write_msg
(
NULL
,
"reading user-defined operator families
\n
"
);
opfinfo
=
getOpfamilies
(
&
numOpfamilies
);
if
(
g_verbose
)
write_msg
(
NULL
,
"reading user-defined conversions
\n
"
);
convinfo
=
getConversions
(
&
numConversions
);
...
...
src/bin/pg_dump/pg_backup_archiver.c
View file @
37995812
...
...
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.13
8 2006/11/21 22:19:46
tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.13
9 2007/01/23 17:54:50
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -2443,7 +2443,8 @@ _getObjectDescription(PQExpBuffer buf, TocEntry *te, ArchiveHandle *AH)
if
(
strcmp
(
type
,
"AGGREGATE"
)
==
0
||
strcmp
(
type
,
"FUNCTION"
)
==
0
||
strcmp
(
type
,
"OPERATOR"
)
==
0
||
strcmp
(
type
,
"OPERATOR CLASS"
)
==
0
)
strcmp
(
type
,
"OPERATOR CLASS"
)
==
0
||
strcmp
(
type
,
"OPERATOR FAMILY"
)
==
0
)
{
/* Chop "DROP " off the front and make a modifiable copy */
char
*
first
=
strdup
(
te
->
dropStmt
+
5
);
...
...
@@ -2571,6 +2572,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
strcmp
(
te
->
desc
,
"FUNCTION"
)
==
0
||
strcmp
(
te
->
desc
,
"OPERATOR"
)
==
0
||
strcmp
(
te
->
desc
,
"OPERATOR CLASS"
)
==
0
||
strcmp
(
te
->
desc
,
"OPERATOR FAMILY"
)
==
0
||
strcmp
(
te
->
desc
,
"SCHEMA"
)
==
0
||
strcmp
(
te
->
desc
,
"TABLE"
)
==
0
||
strcmp
(
te
->
desc
,
"TYPE"
)
==
0
||
...
...
src/bin/pg_dump/pg_dump.c
View file @
37995812
This diff is collapsed.
Click to expand it.
src/bin/pg_dump/pg_dump.h
View file @
37995812
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.13
1 2007/01/05 22:19:48 momjian
Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.h,v 1.13
2 2007/01/23 17:54:50 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -96,6 +96,7 @@ typedef enum
DO_AGG
,
DO_OPERATOR
,
DO_OPCLASS
,
DO_OPFAMILY
,
DO_CONVERSION
,
DO_TABLE
,
DO_ATTRDEF
,
...
...
@@ -192,6 +193,12 @@ typedef struct _opclassInfo
char
*
rolname
;
}
OpclassInfo
;
typedef
struct
_opfamilyInfo
{
DumpableObject
dobj
;
char
*
rolname
;
}
OpfamilyInfo
;
typedef
struct
_convInfo
{
DumpableObject
dobj
;
...
...
@@ -421,6 +428,7 @@ extern FuncInfo *getFuncs(int *numFuncs);
extern
AggInfo
*
getAggregates
(
int
*
numAggregates
);
extern
OprInfo
*
getOperators
(
int
*
numOperators
);
extern
OpclassInfo
*
getOpclasses
(
int
*
numOpclasses
);
extern
OpfamilyInfo
*
getOpfamilies
(
int
*
numOpfamilies
);
extern
ConvInfo
*
getConversions
(
int
*
numConversions
);
extern
TableInfo
*
getTables
(
int
*
numTables
);
extern
InhInfo
*
getInherits
(
int
*
numInherits
);
...
...
src/bin/pg_dump/pg_dump_sort.c
View file @
37995812
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump_sort.c,v 1.1
6 2007/01/05 22:19:48 momjian
Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump_sort.c,v 1.1
7 2007/01/23 17:54:50 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -33,6 +33,7 @@ static const int oldObjectTypePriority[] =
3
,
/* DO_AGG */
3
,
/* DO_OPERATOR */
4
,
/* DO_OPCLASS */
4
,
/* DO_OPFAMILY */
5
,
/* DO_CONVERSION */
6
,
/* DO_TABLE */
8
,
/* DO_ATTRDEF */
...
...
@@ -62,6 +63,7 @@ static const int newObjectTypePriority[] =
5
,
/* DO_AGG */
6
,
/* DO_OPERATOR */
7
,
/* DO_OPCLASS */
7
,
/* DO_OPFAMILY */
9
,
/* DO_CONVERSION */
10
,
/* DO_TABLE */
12
,
/* DO_ATTRDEF */
...
...
@@ -996,6 +998,11 @@ describeDumpableObject(DumpableObject *obj, char *buf, int bufsize)
"OPERATOR CLASS %s (ID %d OID %u)"
,
obj
->
name
,
obj
->
dumpId
,
obj
->
catId
.
oid
);
return
;
case
DO_OPFAMILY
:
snprintf
(
buf
,
bufsize
,
"OPERATOR FAMILY %s (ID %d OID %u)"
,
obj
->
name
,
obj
->
dumpId
,
obj
->
catId
.
oid
);
return
;
case
DO_CONVERSION
:
snprintf
(
buf
,
bufsize
,
"CONVERSION %s (ID %d OID %u)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment