git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1fe08e)
Fix comparison of an array of characters with zero to compare with '0円' instead.
Tue, 4 Feb 2014 01:59:39 +0000 (10:59 +0900)
Tue, 4 Feb 2014 01:59:39 +0000 (10:59 +0900)
Report from Andres Freund.


diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 29fc134858b9f61042ed14d99b431f74696f4254..a4f31cfc7fc701a5be2084788edf397ac1b419f8 100644 (file)
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1751,7 +1751,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
/* Fill values and NULLs */
values[0] = Int64GetDatum(archiver_stats->archived_count);
- if (archiver_stats->last_archived_wal == 0)
+ if (*(archiver_stats->last_archived_wal) == '0円')
nulls[1] = true;
else
values[1] = CStringGetTextDatum(archiver_stats->last_archived_wal);
@@ -1762,7 +1762,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
values[2] = TimestampTzGetDatum(archiver_stats->last_archived_timestamp);
values[3] = Int64GetDatum(archiver_stats->failed_count);
- if (archiver_stats->last_failed_wal == 0)
+ if (*(archiver_stats->last_failed_wal) == '0円')
nulls[4] = true;
else
values[4] = CStringGetTextDatum(archiver_stats->last_failed_wal);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /