]> granicus.if.org Git - postgresql/commit
Invent an assign-hook mechanism for psql variables similar to the one
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Aug 2006 15:19:51 +0000 (15:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Aug 2006 15:19:51 +0000 (15:19 +0000)
commit0434c46db059a80b0e89397a137dfa10421573f4
tree43f7d6fd2e7a47c1d243ff1cb55f8df06a75b1ba
parentb681bfdd59918e3b65bd0b499075f99b39e511b5
Invent an assign-hook mechanism for psql variables similar to the one
existing for backend GUC variables, and use this to eliminate repeated
fetching/parsing of psql variables in psql's inner loops.  In a trivial
test with lots of 'select 1;' commands, psql's CPU time went down almost
10%, although of course the effect on total elapsed time was much less.
Per discussion about how to ensure the upcoming FETCH_COUNT patch doesn't
cost any performance when not being used.
12 files changed:
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/copy.c
src/bin/psql/describe.c
src/bin/psql/input.c
src/bin/psql/large_obj.c
src/bin/psql/mainloop.c
src/bin/psql/prompt.c
src/bin/psql/settings.h
src/bin/psql/startup.c
src/bin/psql/variables.c
src/bin/psql/variables.h