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

Commit7e6aeb5

Browse files
committed
Substitute defines for numeric constants in type ids.
Use INT4OID instead of 23.
1 parenta4c18f5 commit7e6aeb5

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*
2222
* IDENTIFICATION
23-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.24 1997/02/13 08:31:27 scrappy Exp $
23+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.25 1997/03/01 15:24:51 momjian Exp $
2424
*
2525
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2626
*
@@ -53,6 +53,7 @@
5353

5454
#include"postgres.h"
5555
#include"access/htup.h"
56+
#include"catalog/pg_type.h"
5657
#include"libpq-fe.h"
5758
#ifndefHAVE_STRDUP
5859
#include"strdup.h"
@@ -282,15 +283,9 @@ dumpClasses_dumpData(FILE *fout, const char *classname,
282283
fprintf(fout,"NULL");
283284
}else {
284285
switch(PQftype(res,field)) {
285-
case21:case22:case23:/* int types */
286-
case810:case910:/* oldint types */
287-
case700:case701:/* float types */
288-
fprintf(fout,"%s",
289-
PQgetvalue(res,tuple,field));
290-
break;
291-
case1005:case1006:case1007:/* _int types */
292-
case1021:case1022:/* _float types */
293-
fprintf(fout,"'%s'",
286+
caseINT2OID:caseINT4OID:caseOIDOID:/* int types */
287+
caseFLOAT4OID:caseFLOAT8OID:/* float types */
288+
fprintf(fout,"%s",
294289
PQgetvalue(res,tuple,field));
295290
break;
296291
default: {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp