postgresql/src/include
Tom Lane ba6f629326 Improve and simplify CREATE EXTENSION's management of GUC variables.
CREATE EXTENSION needs to transiently set search_path, as well as
client_min_messages and log_min_messages.  We were doing this by the
expedient of saving the current string value of each variable, doing a
SET LOCAL, and then doing another SET LOCAL with the previous value at
the end of the command.  This is a bit expensive though, and it also fails
badly if there is anything funny about the existing search_path value,
as seen in a recent report from Roger Niederland.  Fortunately, there's a
much better way, which is to piggyback on the GUC infrastructure previously
developed for functions with SET options.  We just open a new GUC nesting
level, do our assignments with GUC_ACTION_SAVE, and then close the nesting
level when done.  This automatically restores the prior settings without a
re-parsing pass, so (in principle anyway) there can't be an error.  And
guc.c still takes care of cleanup in event of an error abort.

The CREATE EXTENSION code for this was modeled on some much older code in
ri_triggers.c, which I also changed to use the better method, even though
there wasn't really much risk of failure there.  Also improve the comments
in guc.c to reflect this additional usage.
2011-10-05 20:44:16 -04:00
..
access Use callbacks in SlruScanDirectory for the actual action 2011-10-04 14:03:23 -03:00
bootstrap Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
catalog Redesign the plancache mechanism for more flexibility and efficiency. 2011-09-16 00:43:52 -04:00
commands Redesign the plancache mechanism for more flexibility and efficiency. 2011-09-16 00:43:52 -04:00
datatype Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h. 2011-09-09 13:23:41 -04:00
executor Make EXPLAIN ANALYZE report the numbers of rows rejected by filter steps. 2011-09-22 11:30:11 -04:00
foreign pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
lib Add missing format attributes 2011-09-10 23:12:46 +03:00
libpq Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h. 2011-09-09 13:23:41 -04:00
mb Fix char2wchar/wchar2char to support collations properly. 2011-04-23 12:35:41 -04:00
nodes Make EXPLAIN ANALYZE report the numbers of rows rejected by filter steps. 2011-09-22 11:30:11 -04:00
optimizer Recognize self-contradictory restriction clauses for non-table relations. 2011-09-24 19:33:16 -04:00
parser Add notion of a "transform function" that can simplify function calls. 2011-06-21 22:21:24 -04:00
port Revert "Force use of "%I64d" format for 64 bit ints on MinGW." 2011-04-27 14:55:18 -04:00
portability Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
postmaster Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04:00
regex Teach regular expression operators to honor collations. 2011-04-10 18:03:09 -04:00
replication Split walsender.h in public/private headers 2011-09-13 21:42:49 -03:00
rewrite Try to acquire relation locks in RangeVarGetRelid. 2011-07-08 22:19:30 -04:00
snowball Add markers for skips. 2011-08-26 18:15:13 -04:00
storage Allow snapshot references to still work during transaction abort. 2011-09-26 22:25:28 -04:00
tcop Clean up the #include mess a little. 2011-09-04 01:13:16 -04:00
tsearch Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04:00
utils Improve and simplify CREATE EXTENSION's management of GUC variables. 2011-10-05 20:44:16 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions. 2011-04-28 10:56:14 -04:00
fmgr.h Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
funcapi.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
getaddrinfo.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
getopt_long.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Makefile Add datatype directory to SUBDIRS. 2011-09-11 04:07:12 +09:00
miscadmin.h Add postmaster/postgres undocumented -b option for binary upgrades. 2011-04-25 12:00:21 -04:00
pg_config.h.in Make pgbench use erand48() rather than random(). 2011-08-03 16:26:40 -04:00
pg_config.h.win32 Correct the lie in pg_config.h.win32 about having inttypes.h. 2011-08-08 08:52:05 -04:00
pg_config_manual.h Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions. 2011-04-28 10:56:14 -04:00
pg_trace.h Add markers. 2011-08-26 18:15:14 -04:00
pgstat.h Move Timestamp/Interval typedefs and basic macros into datatype/timestamp.h. 2011-09-09 13:23:41 -04:00
pgtime.h Simplify handling of the timezone GUC by making initdb choose the default. 2011-09-09 17:59:11 -04:00
port.h setlocale() on Windows doesn't work correctly if the locale name contains 2011-09-01 11:08:32 +03:00
postgres.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
postgres_ext.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres_fe.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
rusagestub.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
windowapi.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00