Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2e859a

Browse files
committed
Generate correct syntax for DROP OPERATOR with unary operators.
1 parentb5ab19a commitb2e859a

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

‎src/bin/pg_dump/common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.58 2001/10/03 20:54:21 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.59 2001/10/22 19:31:09 tgl Exp $
1212
*
1313
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1414
*
@@ -74,6 +74,8 @@ findTypeByOid(TypeInfo *tinfo, int numTypes, const char *oid, OidOptions opts)
7474
return"'any'";
7575
elseif ((opts&zeroAsStar)!=0)
7676
return"*";
77+
elseif ((opts&zeroAsNone)!=0)
78+
return"NONE";
7779
}
7880

7981
for (i=0;i<numTypes;i++)

‎src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.233 2001/10/03 20:54:21 tgl Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.234 2001/10/22 19:31:09 tgl Exp $
2626
*
2727
*-------------------------------------------------------------------------
2828
*/
@@ -3642,10 +3642,13 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
36423642
}
36433643

36443644
resetPQExpBuffer(delq);
3645-
appendPQExpBuffer(delq,"DROP OPERATOR %s (%s",oprinfo[i].oprname,
3646-
findTypeByOid(tinfo,numTypes,oprinfo[i].oprleft,zeroAsOpaque));
3645+
appendPQExpBuffer(delq,"DROP OPERATOR %s (%s",
3646+
oprinfo[i].oprname,
3647+
findTypeByOid(tinfo,numTypes,oprinfo[i].oprleft,
3648+
zeroAsNone));
36473649
appendPQExpBuffer(delq,", %s);\n",
3648-
findTypeByOid(tinfo,numTypes,oprinfo[i].oprright,zeroAsOpaque));
3650+
findTypeByOid(tinfo,numTypes,oprinfo[i].oprright,
3651+
zeroAsNone));
36493652

36503653
resetPQExpBuffer(q);
36513654
appendPQExpBuffer(q,

‎src/bin/pg_dump/pg_dump.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_dump.h,v 1.72 2001/10/03 20:54:21 tgl Exp $
9+
* $Id: pg_dump.h,v 1.73 2001/10/22 19:31:09 tgl Exp $
1010
*
1111
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1212
*
@@ -224,6 +224,7 @@ typedef enum _OidOptions
224224
zeroAsOpaque=1,
225225
zeroAsAny=2,
226226
zeroAsStar=4,
227+
zeroAsNone=8,
227228
useBaseTypeName=1024
228229
}OidOptions;
229230

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp