Skip to content

Commit

Permalink
Backward args, oops
Browse files Browse the repository at this point in the history
  • Loading branch information
pramsey committed May 12, 2015
1 parent 6b7acea commit c35cc26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions http--1.0--1.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions http--1.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c35cc26

Please sign in to comment.