Skip site navigation (1) Skip section navigation (2)

pgsql: Use guc.c's parse_int() instead of pg_atoi() to parse fillfactor

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use guc.c's parse_int() instead of pg_atoi() to parse fillfactor
Date: 2008-07-23 17:29:53
Message-ID: 20080723172953.7C97C754A86@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Use guc.c's parse_int() instead of pg_atoi() to parse fillfactor in
default_reloptions().  The previous coding was really a bug because pg_atoi()
will always throw elog on bad input data, whereas default_reloptions is not
supposed to complain about bad input unless its validate parameter is true.
Right now you could only expose the problem by hand-modifying
pg_class.reloptions into an invalid state, so it doesn't seem worth
back-patching; but we should get it right in HEAD because there might be other
situations in future.  Noted while studying GIN fast-update patch.

Modified Files:
--------------
    pgsql/src/backend/access/common:
        reloptions.c (r1.10 -> r1.11)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/common/reloptions.c?r1=1.10&r2=1.11)
    pgsql/src/backend/utils/misc:
        guc.c (r1.464 -> r1.465)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.464&r2=1.465)
    pgsql/src/include/utils:
        guc.h (r1.97 -> r1.98)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc.h?r1=1.97&r2=1.98)

pgsql-committers by date

Next:From: Alvaro HerreraDate: 2008-07-23 20:20:10
Subject: pgsql: Ratchet up patch to improve autovacuum wraparound messages.
Previous:From: Peter EisentrautDate: 2008-07-23 17:07:50
Subject: pgsql: Abort if Tcl support was configured and no tcl shell was found.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group