Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: pgsql: Removed comparison of unsigned expression < 0. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Removed comparison of unsigned expression < 0.
Date
Msg-id [email protected]
Whole thread Raw
In response to pgsql: Removed comparison of unsigned expression < 0.  ([email protected] (Michael Meskes))
Responses Re: pgsql: Removed comparison of unsigned expression < 0.
List pgsql-committers
[email protected] (Michael Meskes) writes:
> Log Message:
> -----------
> Removed comparison of unsigned expression < 0.

I believe that this change is a bad idea and should be reverted:

>         fe-exec.c (r1.200 -> r1.201)
>         (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-exec.c?r1=1.200&r2=1.201)

This is correct only if enum ExecStatusType is considered unsigned by
the compiler, an assumption that I don't believe is portable.  (In
fact, Zdenek was just complaining about something else that seems to
prove Solaris' compiler treats enums as signed always.)

The other two changes seem ok, since they are for size_t variables which
are definitely supposed to be unsigned.

            regards, tom lane

pgsql-committers by date:

Previous
From: [email protected] (Tom Lane)
Date:
Subject: pgsql: Allow the second argument of pg_get_expr() to be just zero when
Next
From: [email protected] (Tom Lane)
Date:
Subject: pgsql: Improve documentation about function volatility: mention the