diff --git a/README.md b/README.md index 13027c2..0269da5 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ Will set the proxy port option for the lifetime of the database connection. You If you have PostgreSQL devel packages and CURL devel packages installed (>= 0.7.20), you should have `pg_config` and `curl-config` on your path, so you should be able to just run `make`, then `make install`, then in your database `CREATE EXTENSION http`. -If you already installed version 1.0 and you just want to upgrade, then `ALTER EXTENSION http UPDATE TO '1.1'`. +If you already installed a previous version and you just want to upgrade, then `ALTER EXTENSION http UPDATE`. ### Windows diff --git a/http--1.1--1.2.sql b/http--1.1--1.2.sql index 6c8b1fd..4764e52 100644 --- a/http--1.1--1.2.sql +++ b/http--1.1--1.2.sql @@ -12,3 +12,13 @@ CREATE OR REPLACE FUNCTION http_head(uri VARCHAR) RETURNS http_response AS $$ SELECT http(('HEAD', $1, NULL, NULL, NULL)::http_request) $$ LANGUAGE 'sql'; + +CREATE OR REPLACE FUNCTION http_set_curlopt (curlopt VARCHAR, value VARCHAR) + RETURNS boolean + AS 'MODULE_PATHNAME', 'http_set_curlopt' + LANGUAGE 'c'; + +CREATE OR REPLACE FUNCTION http_reset_curlopt () + RETURNS boolean + AS 'MODULE_PATHNAME', 'http_reset_curlopt' + LANGUAGE 'c';