Reverting patch just in case a compiler treats this enum as signed.
authorMichael Meskes <meskes@postgresql.org>
Wed, 27 May 2009 14:16:51 +0000 (14:16 +0000)
committerMichael Meskes <meskes@postgresql.org>
Wed, 27 May 2009 14:16:51 +0000 (14:16 +0000)
src/interfaces/libpq/fe-exec.c

index 5990fb7c1cab25568893814efd75016acac328ee..c1934ad643090f5f6f8a012969b6f9a9fe67d1c9 100644 (file)
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
 char *
 PQresStatus(ExecStatusType status)
 {
-       if (status >= sizeof pgresStatus / sizeof pgresStatus[0])
+       if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
                return libpq_gettext("invalid ExecStatusType code");
        return pgresStatus[status];
 }