CREATE EXTENSION nominatim_fdw; CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (http_proxy 'http://proxy.im'); ERROR: required option 'url' is missing CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url ''); ERROR: empty value in option 'url' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'bar'); ERROR: invalid url: 'bar' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://proxy.im', http_proxy ''); ERROR: empty value in option 'http_proxy' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'bar'); ERROR: invalid http_proxy: 'bar' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user ''); ERROR: empty value in option 'proxy_user' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password ''); ERROR: empty value in option 'proxy_user_password' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout ''); ERROR: empty value in option 'connect_timeout' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '-1'); ERROR: invalid connect_timeout: '-1' HINT: expected values are positive integers (timeout in seconds) CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '42', max_connect_retry ''); ERROR: empty value in option 'max_connect_retry' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '42', max_connect_retry '-1'); ERROR: invalid max_connect_retry: '-1' HINT: expected values are positive integers CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '42', max_connect_retry '73', max_connect_redirect ''); ERROR: empty value in option 'max_connect_redirect' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '42', max_connect_retry '73', max_connect_redirect '-1'); ERROR: invalid max_connect_redirect: '-1' HINT: expected values are positive integers CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '42', max_connect_retry '73', max_connect_redirect ''); ERROR: empty value in option 'max_connect_redirect' CREATE SERVER foo FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', http_proxy 'http://server.im', proxy_user 'jim', proxy_user_password 'pw', connect_timeout '42', max_connect_retry '73', max_connect_redirect '-1'); ERROR: invalid max_connect_redirect: '-1' HINT: expected values are positive integers /* invalid URL - retrying as set in 'max_connect_retry' */ CREATE SERVER srv FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im', max_connect_retry '5', connect_timeout '10'); SELECT * FROM nominatim_search(server_name => 'srv', q => 'foo'); WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" WARNING: ExecuteRequest: request to 'http://server.im' failed with return code 200 (1) WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" WARNING: ExecuteRequest: request to 'http://server.im' failed with return code 200 (2) WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" WARNING: ExecuteRequest: request to 'http://server.im' failed with return code 200 (3) WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" WARNING: ExecuteRequest: request to 'http://server.im' failed with return code 200 (4) WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" WARNING: ExecuteRequest: request to 'http://server.im' failed with return code 200 (5) ERROR: ExecuteRequest => (23) Failed writing header /* no retry! */ ALTER SERVER srv OPTIONS (SET max_connect_retry '0'); SELECT * FROM nominatim_search(server_name => 'srv', q => 'foo'); WARNING: HeaderCallbackFunction: unsupported header entry: "content-type: text/html; charset=utf-8" ERROR: ExecuteRequest => (23) Failed writing header DROP SERVER srv; /* server does not exist */ SELECT * FROM nominatim_search(server_name => 'foo', q => 'bar'); ERROR: FOREIGN SERVER does not exist: 'foo' SELECT * FROM nominatim_search(server_name => 'foo', city => 'bar'); ERROR: FOREIGN SERVER does not exist: 'foo' SELECT * FROM nominatim_reverse(server_name => 'foo',lon => '1', lat => '2'); ERROR: FOREIGN SERVER does not exist: 'foo' SELECT * FROM nominatim_lookup(server_name => 'foo', osm_ids => 'W1'); ERROR: FOREIGN SERVER does not exist: 'foo' CREATE SERVER srv FOREIGN DATA WRAPPER nominatim_fdw OPTIONS (url 'http://server.im'); /* bad request: 'q' and 'amenity' cannot be combined */ SELECT * FROM nominatim_search(server_name => 'srv', q => 'foo', amenity => 'bar'); ERROR: bad request => structured query parameters (amenity, street, city, county, state, postalcode, country) cannot be used together with 'q' parameter /* bad request: nothing to search for */ SELECT * FROM nominatim_search(server_name => 'srv'); ERROR: bad request => nothing to search for. HINT: a 'nominatim_fdw_search' request requires either a 'q' (free form parameter) or one of the structured query parameteres (amenity, street, city, county, state, postalcode, country) /* bad request: invalid layer */ SELECT * FROM nominatim_search(server_name => 'srv', q => 'foo', layer => 'bar'); ERROR: invalid layer 'bar' HINT: this parameter expects one of the following layers: address, poi, railway, natural, manmade /* FOREIGN TABLE not supported */ CREATE FOREIGN TABLE t (osm_id bigint OPTIONS (foo 'bar')) SERVER srv OPTIONS (foo 'bar'); ERROR: FOREIGN TABLE not supported HINT: The nominatim_fdw does not support FOREIGN TABLE mapping. Use the query functions instead.