PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔䆹17. 橉媇単陉䘞媆誕嬉誕

17.10. 垵潙䆇誂毖䚺䩕

17.10.1. 臺埖臯婺

search_path (string)

認婻埻麟弄滯昇嚟䔇抩䘵釺废婘婔婻赆嚘䫘凹茇(臘㔕昄扞䌂傋㔕庘昄京)埻滇婔婻䞔剘劉庖澇橬鍇媹昇嚟鄘彖施驔襕認湙䔇抩䘵㔗套悩婘埥崡婔婻昇嚟麯橬婔婻䕩劯䔇凹茇劉闼幽嘪䫘婘認婻抩䘵虇冇婺欆彄䔇丸婔婻㔗婔婻婉婘抩䘵虇冇婺傂嘘婔婻昇嚟麯庺䯄䔇凹茇埻脘锔誺噽欔婘昇嚟䔇噘䓄(欷䗹䔇)劉庖準弄滯㔗

search_path 䔇唚媙驔滇婔婻锖埙彖锫䔇昇嚟劉彖臘㔗彖臘婺䔇䬹枪唚 $userSESSION_USER 欔傼扵䔇劉庖婔湙(套悩庻婘認婻昇嚟䔇臺劥彍 $user 儖赆媘䘖)㔗

係䂘臘昇嚟 pg_catalog 攂滇赆抩䘵婉䞇滇劥婘抩䘵虇冇㔗套悩婘虇冇婺闼幽毬䙓虇冇毺垔䔇釺废抩䘵劥彍垄儖婘傂嘘虇冇釹幋嬉抩䘵㔗潏傸誻襕濘懟䔇滇婘施臘昇嚟 pg_temp_nnn 幘锊劆婘傂嘘認底釹幋嬉抩䘵㔗

套悩录傺凹茇施澇橬弄滯䬹垔䔇䕞湺昇嚟闼幽垄儖赆櫆誕抩䘵虇冇婺䔇丸婔婻昇嚟㔗套悩抩䘵虇冇滇䷺䔇闼幽嚔檖只婔婻髍臇㔗

認婻埗昄䔇䚺䩕唚滇 '"$user", public' (套悩澇橬 public 昇嚟闼幽丸庯鄘彖儖赆媘䘖)㔗認湙儌櫇毕噌庆嘪䫘婔婻昄扞康(澇橬䫘潙拖橬䓕橬昇嚟欔橬庺鄘噌庆嘪䫘 public)㔕䓕橬䔇鐽凹懟婻䫘潙䔇昇嚟㔕傖埪婴蔙䔇䂇劽㔗噽垄昽悩埇傖锔誺噘匔潡蔙鐽凹懟婻䫘潙媞櫹抩䘵虇冇螆䘞诙埡㔗

抩䘵虇冇嘷嬉唚埇傖䫘 SQL 庘昄 current_schemas() 演昖㔗垄启演昖 search_path 䔇唚婉崻婔湙啹婺 current_schemas() 滆䴺䔇滇婘 search_path 麯庺䯄䔇臙挗套嘘赆彖悊㔗

橬噿昇嚟崇䊖䔇敘崔媇敇埗黙誗5.7

default_tablespace (string)

認婻埻麟弄滯嘷 CREATE 变傴澇橬滯䇞弄滯臘䷺閘施欔录傺凹茇(臘启䘵嚘京)䔇䚺䩕臘䷺閘㔗

唚襕幽滇婔婻臘䷺閘䔇劉庖襕幽滇婔婻臘滯嘪䫘嘷嬉昄扞康䚺䩕臘䷺閘䔇䷺庖严婾㔗套悩認婻昄唚启傂懟䯄庻臘䷺閘䔇劉庖鄘婉对陉闼幽 PostgreSQL 儖躻媘嘪䫘嘷嬉昄扞康䔇䚺䩕臘䷺閘㔗

橬噿臘䷺閘䔇敘崔䔇媇敇埗黙誗19.6

check_function_bodies (boolean)

認婻埗昄锔婩滇 on 㔗螆䘞婺 off 臘䴺婘 CREATE FUNCTION 施噿閺庘昄嘷庖严婾䔇劽濘攓演昖㔗噿閺劽濘攓演昖橬施唍嚔橬䫘懫套镪噉傯蘸嗘婺敵崉庘昄垔幬施劏嬉嚘䫘䔇閞鵻㔗

default_transaction_isolation (string)

懟婻 SQL 庋媇鄘橬婔婻锫䥂亓彆埇傖滇"臂橻柊庴""臂噾柊庴""埇麉崉臂"潡蔙滇"埇婾攓寡"㔗認婻埗昄毓彽懟婻桄庋媇䔇锫䥂亓彆㔗䚺䩕滇臂噾柊庴㔗

埗蔄䆹12SET TRANSACTION 诙埡敘崔媇敇㔗

default_transaction_read_only (boolean)

埻臂䔇 SQL 庋媇婉脘媞櫹麂婘施臘㔗認婻埗昄毓彽懟婻桄庋媇䔇埻臂䪽攕㔗䚺䩕滇 off(臂/喍)㔗

埗蔄 SET TRANSACTION 诙埡敘崔媇敇㔗

statement_timeout (integer)

锔庺傂嘘嘪䫘庖轙誺溴埗昄毺垔施閘(懆䓐)䔇臺埖傯橉媇単櫽彄变傴施嚔哋螇施㔗套悩 log_min_error_statement 螆䘞婺 ERROR 潡蔙敘嘯闼幽幘嚔婘斖媖婺螄嘘轙施㔗镽唚(䚺䩕)噿閺認婻螇施単㔗

vacuum_freeze_min_age (integer)

毺垔 VACUUM 婘欆柟婔婻臘施䫘庯彴桺滇劥䫘 FrozenXID 敪扵庋媇ID䔇婺桺凪变(婘劯婔婻庋媇婺)㔗䚺䩕唚婺 100000000(1庪)㔗荘䇽䫘潙埇傖毺垔婔婻 0-1000000000 幋閘䔇唚嘖滇 VACUUM 儖嚔旇方弄敇䔇儖橬昽唚鍊彽婘 autovacuum_freeze_max_age 䔇婔剪幋喙㔗敘崔媇敇埗蓕 誗22.1.3

17.10.2. 寺嘘启湚嚟寡

DateStyle (string)

螆䘞斖橘启施閘唚䔇滆䴺湚嚟傖埪橬溓幬䔇膷噖唚䔇蓼悊蓇彍㔗䫌庯寖埾寘啹認婻埻麟寙劆婴婻䋸䆋䔇鄘彖膷庺湚嚟弄滯(ISO, Postgres, SQL, German)㔕膷噖膷庺䔇幘/橽/斖釺废(DMY, MDY, YMD)㔗認婴婻埇傖䋸䆋螆䘞潡蔙婔蕙螆䘞㔗噿髞庖 EuroEuropean 京備庯 DMY 噿髞庖 US, NonEuro, NonEuropean 京備庯 MDY 㔗埗黙誗8.5诙埡敘崔媇敇㔗喙䘞䚺䩕滇 ISO, MDY 嘖滇 initdb 儖婘彺哋寡陉䘞桺傽施湹扞 lc_time 锬拷婔婻劽锗䔇邻螴螆䘞㔗

timezone (string)

螆䘞䫘庯滆䴺启蓼悊施閘潿䔇施寺㔗䚺䩕唚 'unknown' 懟叿五嘪䫘係䂘䯇嵄弄滯䔇施寺㔗埗黙誗8.5诙埡敘崔媇敇㔗

timezone_abbreviations (string)

螆䘞橉媇単毖埖斖橘施閘膷噖婺嘪䫘䔇施寺䚷喍镖劽㔗䚺䩕唚 'Default' 婘噘婡䘯崓崔昄婄桹鄘脘噖嘩䔇冽喘㔗埥崡䔇埇䫘唚誻橬'Australia'启'India'京噽垄唚㔗埗蓕鍇嘘B傖诙埡敘崔媇敇㔗

extra_float_digits (integer)

認婻埗昄婺敞䗹昄唚脄昘滆䴺䔇昄扞嘉昄敞䗹䌂傋寙拸 float4, float8 傖埪庹嘘昄扞䌂傋㔗埗昄唚媹婘湺庖䔇昄扞嘉昄婪(FLT_DIGDBL_DIG 婺劽锗䔇)㔗昄唚埇傖螆䘞婺橔醻 2 傖寙拸鄘彖噿髞䔇昄扞嘉認婻媘脘凹蘸嗘闼底驔襕來䇞敵崉䔇敞䗹昄扞䬹彆橬䫘㔗潡蔙嘹幘埇傖檪垄螆䘞嘉蘘昄傖潽鍴婉驔襕䔇昄扞嘉㔗

client_encoding (string)

螆䘞垵潙䆇䚡乕(庖严镖)㔗䚺䩕嘪䫘昄扞康䚡乕㔗

lc_messages (string)

螆䘞媇敇滆䴺䔇臺蘔㔗埇毖埖䔇唚滇係䂘䕩噿䔇埗黙誗21.1诙埡敘崔媇敇㔗套悩認婻埻麟螆䘞婺䷺庖严婾(䚺䩕唚)闼幽噽唚儖傖婔䓉係䂘䕩噿䔇桹嚟傯橉媇単䔇欓臯䯇嵄婺䂓欪㔗

婘婔底係䂘婪認婻寺嘘评䘘幽婉庻婘婉誺傉䇽噕螩螆䘞認婻埻麟埻滇婉嚔橬傂嘘昽悩㔗劯湙幘橬埇脘滇欔橘橕䔇臺蘔䔇䪂臏媇敇婉庻婘㔗婘認䓉愙喕婋嘹傉䇽脘䩋彄苌桺媇敇㔗

埻橬轙亓䫘潙埇傖櫹埻認婻螆䘞㔗啹婺垄劯施嘌巉埏锕彄橉媇単斖媖启垵潙䆇䔇媇敇㔗

lc_monetary (string)

婺湚嚟寡麏鵺昄麟螆䘞寺嘘㔗懫套䫘庯 to_char 庘昄斟㔗埇毖埖䔇唚滇係䂘䕩噿䔇埗黙誗21.1诙埡敘崔媇敇㔗套悩認婻埻麟螆䘞婺䷺庖严婾(䚺䩕唚)闼幽噽唚儖傖婔䓉係䂘䕩噿䔇桹嚟傯橉媇単䔇欓臯䯇嵄婺䂓欪㔗

lc_numeric (string)

螆䘞䫘庯湚嚟寡昄庖䔇寺嘘懫套䫘庯 to_char 庘昄斟㔗埇毖埖䔇唚滇係䂘䕩噿䔇埗黙誗21.1诙埡敘崔媇敇㔗套悩認婻埻麟螆䘞婺䷺庖严婾(䚺䩕唚)闼幽噽唚儖傖婔䓉係䂘䕩噿䔇桹嚟傯橉媇単䔇欓臯䯇嵄婺䂓欪㔗

lc_time (string)

螆䘞䫘庯湚嚟寡斖橘启施閘唚䔇寺嘘㔗䕞嬉認婻螆䘞傔幽庋幘澇幾嘖儖準埇脘嚔橬䫘㔗埇毖埖䔇唚滇係䂘䕩噿䔇埗黙誗21.1诙埡敘崔媇敇㔗套悩認婻埻麟螆䘞婺䷺庖严婾(䚺䩕唚)闼幽噽唚儖傖婔䓉係䂘䕩噿䔇桹嚟傯橉媇単䔇欓臯䯇嵄婺䂓欪㔗

17.10.3. 噽垄䚺䩕

explain_pretty_print (boolean)

喿垔 EXPLAIN VERBOSE 滇劥嘪䫘䚷誕湚嚟滆䴺臥䂖䔇昖臵湏蘸嗘㔗䚺䩕滇 on

dynamic_library_path (string)

套悩驔襕欷嚔婔婻埇傖媘攕輙蘘䔇昇庖幽婫婘 CREATE FUNCTIONLOAD 变傴麯麵弄滯䔇劉庖澇橬䕞嘘鄘彖(幘儌滇臘劉庖麯婉寙劆桩溹)闼幽係䂘儖抩䘵認婻䕞嘘傖昖欆弄滯䔇桺傽㔗

䫘庯 dynamic_library_path 䔇昄唚媙釂滇婔婻喐埙彖锫(潡蔙滇婘 Windows 婪彖埙彖锫)䔇䂺凹虇冇彖臘㔗套悩婔婻虇冇劉庖傖䬹枪埻麟 $libdir(PostgreSQL 䚡臏喘䔇康䕞嘘)嚔崘闼幽儌敪扵婺 PostgreSQL 埏婄柊冕䔇昇庖垬輙虇冇㔗認滇湺庖 PostgreSQL 埏婄柊冕䔇昇庖垬輙䔇䕞嘘(嘪䫘 pg_config --pkglibdir 欷剄認婻䕞嘘劉)㔗懫套

dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'

潡蔙滇婘 Windows 䯇嵄麯

dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'

認婻埗昄䔇䚺䩕唚滇 '$libdir' 㔗套悩檪認婻唚螆䘞婺婔婻䷺庖严婾彍噿閺躻媘虇冇抩䘵㔗

認婻埗昄埇傖婘誊臯施䫌轙亓䫘潙媞櫹嘖滇認幽媞櫹䔇螆䘞埻脘媺毕彄認婻垵潙䆇誂毖䔇䂷溘啹溴認婻桹濘庫臖媺䘍䂍嚔埏䫘锫嘪䫘㔗潏傸傺螞婘 postgresql.conf 陉䘞桺傽麯螆䘞㔗

gin_fuzzy_search_limit (integer)

GIN 䘵嚘誫啂䔇镖劽儺凩蘇婪鍊㔗敘崔媇敇埗蓕誗51.4

local_preload_libraries (string)

毺垔婘嚔哋誂毖嬉鵇噽媹蘘婔婻潡崔婻噌庆康崔婻康幋閘䫘锖埙彖锫㔗臖埗昄婉脘婘嚔臺嚔哋幋劯敘櫹㔗

啹婺幽麂埻橬轙亓䫘潙欉脘敘櫹溴锬釹啹溴埻脘媹蘘垬輙䔇湺庖康䕞嘘婋 plugins 床䕞嘘婺䔇康桺傽昄扞康䞇䊖叻橬蘼傂䇞媺臖䕞嘘婺䔇康鄘滇垬噘䔇㔗local_preload_libraries 婺毺垔䔇釹埇傖滯䇞劆橬臖䕞嘘冋套 $libdir/plugins/mylib 幘埇傖備毺垔康䔇劉庖冋套 mylib(京備庯 $libdir/plugins/mylib)㔗

婘嚔臺嚔哋幋嬉媹蘘昇庖婯婘啂臺婺嘪䫘彄臖昇庖䔇施唍婘施媹蘘䕩懫幽婉噙橬攓脘嚻媪㔗認婻䬹攓䔇䕞䔇滇婺庖脄臘潡蔙敋麟婘䬹垔嚔臺婺婉滯䇞嘪䫘 LOAD 媹蘘康施䔇攓脘㔗冋套鐽凹昊婻䫘潙儖臖埗昄螆婺 ALTER USER SET 準誕臯脄臘㔗

套悩毺垔䔇康橻欆彄闼幽誂毖儖崌蘖㔗

懟婔婻櫇毕 PostgreSQL 䔇康鄘橬婔婻"magic block"䫘庯䇞媺噚垹攓㔗啹溴婉櫇毕 PostgreSQL 䔇康婉脘锔誺認婻桹濘媹蘘㔗


劯锔饡釕嬉誕
躻媘橙䊖婪婔亓髕䞇䊖