From c35cc26534e17ef33bc9375bcef44cd5a9247752 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 12 May 2015 05:12:52 -0700 Subject: [PATCH] Backward args, oops --- http--1.0--1.1.sql | 4 ++-- http--1.1.sql | 4 ++-- http.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/http--1.0--1.1.sql b/http--1.0--1.1.sql index 3fbbd7b..1065ad9 100644 --- a/http--1.0--1.1.sql +++ b/http--1.0--1.1.sql @@ -48,12 +48,12 @@ CREATE OR REPLACE FUNCTION http_get(uri VARCHAR) CREATE OR REPLACE FUNCTION http_post(uri VARCHAR, content VARCHAR, content_type VARCHAR) RETURNS http_response - AS $$ SELECT http(('POST', $1, NULL, $2, $3)::http_request) $$ + AS $$ SELECT http(('POST', $1, NULL, $3, $2)::http_request) $$ LANGUAGE 'sql'; CREATE OR REPLACE FUNCTION http_put(uri VARCHAR, content VARCHAR, content_type VARCHAR) RETURNS http_response - AS $$ SELECT http(('PUT', $1, NULL, $2, $3)::http_request) $$ + AS $$ SELECT http(('PUT', $1, NULL, $3, $2)::http_request) $$ LANGUAGE 'sql'; CREATE OR REPLACE FUNCTION http_delete(uri VARCHAR) diff --git a/http--1.1.sql b/http--1.1.sql index ca4e10b..269dcda 100644 --- a/http--1.1.sql +++ b/http--1.1.sql @@ -51,12 +51,12 @@ CREATE OR REPLACE FUNCTION http_get(uri VARCHAR) CREATE OR REPLACE FUNCTION http_post(uri VARCHAR, content VARCHAR, content_type VARCHAR) RETURNS http_response - AS $$ SELECT http(('POST', $1, NULL, $2, $3)::http_request) $$ + AS $$ SELECT http(('POST', $1, NULL, $3, $2)::http_request) $$ LANGUAGE 'sql'; CREATE OR REPLACE FUNCTION http_put(uri VARCHAR, content VARCHAR, content_type VARCHAR) RETURNS http_response - AS $$ SELECT http(('PUT', $1, NULL, $2, $3)::http_request) $$ + AS $$ SELECT http(('PUT', $1, NULL, $3, $2)::http_request) $$ LANGUAGE 'sql'; CREATE OR REPLACE FUNCTION http_delete(uri VARCHAR) diff --git a/http.c b/http.c index bae6f4d..e5fcf42 100644 --- a/http.c +++ b/http.c @@ -597,7 +597,7 @@ Datum http_request(PG_FUNCTION_ARGS) /* Run it! */ http_return = curl_easy_perform(http_handle); - elog(DEBUG2, "pgsql-http: queried %s", uri); + elog(DEBUG2, "pgsql-http: queried '%s'", uri); /* Clean up some input things we don't need anymore */ ReleaseTupleDesc(tup_desc);