From: Regina Obe Date: Thu, 31 May 2012 00:50:42 +0000 (+0000) Subject: #1843 document new geocode_setting set/get functions, make publically readable. X-Git-Tag: 2.1.0beta2~961 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ed17e748ea520c9b6a748f9ced33b3ba136898e;p=postgis #1843 document new geocode_setting set/get functions, make publically readable. git-svn-id: http://svn.osgeo.org/postgis/trunk@9830 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/extras_tigergeocoder.xml b/doc/extras_tigergeocoder.xml index cddfa41de..2f509ce39 100644 --- a/doc/extras_tigergeocoder.xml +++ b/doc/extras_tigergeocoder.xml @@ -426,6 +426,59 @@ Total query runtime: 245 ms. + + + Get_Geocode_Setting + + Returns value of specific setting stored in tiger.geocode_settings table. + + + + + + text Get_Geocode_Setting + text setting_name + + + + + + Description + + Returns value of specific setting stored in tiger.geocode_settings table. Settings allow you to toggle debugging of functions. Later plans will be to control rating with settings. Current list of settings are as follows: + name | category | short_desc +----------------------------+----------+---------------------------------------------------------------------------------- + debug_geocode_address | debug | outputs debug information in notice log such as queries + | when geocode_addresss is called if true + debug_geocode_intersection | debug | outputs debug information in notice log such as queries + | when geocode_intersection is called if true + debug_normalize_address | debug | outputs debug information in notice log such as queries + | and intermediate expressions when normalize_address is called if true + debug_reverse_geocode | debug | if true, outputs debug information in notice log + such as queries and intermediate expressions when reverse_geocode + + + Availability: 2.1.0 + + + + + + Example return debugging setting + SELECT get_geocode_setting('debug_geocode_address) As result; +result +--------- +false + + + + + + See Also + > + + + Get_Tract @@ -1194,4 +1247,47 @@ SELECT * FROM , , , + + + + Set_Geocode_Setting + + Sets a setting that affects behavior of geocoder functions. + + + + + + text Set_Geocode_Setting + text setting_name + text setting_value + + + + + + Description + + Sets value of specific setting stored in tiger.geocode_settings table. Settings allow you to toggle debugging of functions. Later plans will be to control rating with settings. Current list of settings are listed in . + + Availability: 2.1.0 + + + + + + Example return debugging setting + If you run when this function is true, the NOTICE log will output timing and queries. + SELECT set_geocode_setting('debug_geocode_address', 'true') As result; +result +--------- +true + + + + + See Also + > + + diff --git a/extras/tiger_geocoder/tiger_2011/geocode_settings.sql b/extras/tiger_geocoder/tiger_2011/geocode_settings.sql index 3d888f699..f13cd4125 100644 --- a/extras/tiger_geocoder/tiger_2011/geocode_settings.sql +++ b/extras/tiger_geocoder/tiger_2011/geocode_settings.sql @@ -22,6 +22,7 @@ BEGIN var_temp := tiger.SetSearchPathForInstall('tiger'); /** set setach path to have tiger in front **/ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'geocode_settings') THEN CREATE TABLE geocode_settings(name text primary key, setting text, unit text, category text, short_desc text); + GRANT SELECT ON geocode_settings TO public; END IF; --add missing settings INSERT INTO geocode_settings(name,setting,unit,category,short_desc)