pgsql: Arrange for SET LOCAL's effects to persist until the end of the - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Arrange for SET LOCAL's effects to persist until the end of the
Date
Msg-id 20070911000642.7796E754206@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Arrange for SET LOCAL's effects to persist until the end of the current top
transaction, unless rolled back or overridden by a SET clause for the same
variable attached to a surrounding function call.  Per discussion, these
seem the best semantics.  Note that this is an INCOMPATIBLE CHANGE: in 8.0
through 8.2, SET LOCAL's effects disappeared at subtransaction commit
(leading to behavior that made little sense at the SQL level).

I took advantage of the opportunity to rewrite and simplify the GUC variable
save/restore logic a little bit.  The old idea of a "tentative" value is gone;
it was a hangover from before we had a stack.  Also, we no longer need a stack
entry for every nesting level, but only for those in which a variable's value
actually changed.

Modified Files:
--------------
    pgsql/doc/src/sgml/ref:
        create_function.sgml (r1.77 -> r1.78)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_function.sgml?r1=1.77&r2=1.78)
        prepare_transaction.sgml (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/prepare_transaction.sgml?r1=1.5&r2=1.6)
        reset.sgml (r1.35 -> r1.36)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/reset.sgml?r1=1.35&r2=1.36)
        set.sgml (r1.90 -> r1.91)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/set.sgml?r1=1.90&r2=1.91)
        show.sgml (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/show.sgml?r1=1.42&r2=1.43)
    pgsql/src/backend/utils/adt:
        ri_triggers.c (r1.96 -> r1.97)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c?r1=1.96&r2=1.97)
    pgsql/src/backend/utils/fmgr:
        fmgr.c (r1.109 -> r1.110)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/fmgr/fmgr.c?r1=1.109&r2=1.110)
    pgsql/src/backend/utils/init:
        miscinit.c (r1.163 -> r1.164)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/miscinit.c?r1=1.163&r2=1.164)
        postinit.c (r1.177 -> r1.178)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c?r1=1.177&r2=1.178)
    pgsql/src/backend/utils/misc:
        README (r1.6 -> r1.7)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/README?r1=1.6&r2=1.7)
        guc-file.l (r1.51 -> r1.52)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc-file.l?r1=1.51&r2=1.52)
        guc.c (r1.419 -> r1.420)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.419&r2=1.420)
    pgsql/src/include/utils:
        guc.h (r1.85 -> r1.86)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc.h?r1=1.85&r2=1.86)
        guc_tables.h (r1.34 -> r1.35)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc_tables.h?r1=1.34&r2=1.35)
    pgsql/src/test/regress/expected:
        guc.out (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/guc.out?r1=1.5&r2=1.6)
    pgsql/src/test/regress/sql:
        guc.sql (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/guc.sql?r1=1.5&r2=1.6)

pgsql-committers by date:

Previous
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Make CLUSTER and REINDEX silently skip remote temp tables in
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Release the exclusive lock on the table early after truncating it