pgsql: Adjust the behavior of the PQExpBuffer code to make it have - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Adjust the behavior of the PQExpBuffer code to make it have
Date
Msg-id 20081126002623.E43BC7545A4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Adjust the behavior of the PQExpBuffer code to make it have well-defined
results (ie, an empty "broken" buffer) if memory overrun occurs anywhere
along the way to filling the buffer.  The previous coding would just silently
discard portions of the intended buffer contents, as exhibited in trouble
report from Sam Mason.  Also, tweak psql's main loop to correctly detect
and report such overruns.  There's probably much more that should be done
in this line, but this is a start.

Modified Files:
--------------
    pgsql/src/bin/psql:
        input.c (r1.64 -> r1.65)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/input.c?r1=1.64&r2=1.65)
        mainloop.c (r1.92 -> r1.93)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/mainloop.c?r1=1.92&r2=1.93)
        psqlscan.l (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/psqlscan.l?r1=1.26&r2=1.27)
    pgsql/src/interfaces/libpq:
        fe-connect.c (r1.369 -> r1.370)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-connect.c?r1=1.369&r2=1.370)
        pqexpbuffer.c (r1.24 -> r1.25)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/pqexpbuffer.c?r1=1.24&r2=1.25)
        pqexpbuffer.h (r1.19 -> r1.20)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/pqexpbuffer.h?r1=1.19&r2=1.20)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: information_schema.key_column_usage.position_in_unique_constraint
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Make DISCARD ALL discard advisory locks, too.