You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
Trying to add the response lib to my environment I run into the following error:
│2020-08-18 09:17:06.958 UTC [71] ERROR: return type mismatch in function declared to return void │
│2020-08-18 09:17:06.958 UTC [71] DETAIL: Actual return type is text. │
│2020-08-18 09:17:06.958 UTC [71] CONTEXT: SQL function "set_header" │
│2020-08-18 09:17:06.958 UTC [71] STATEMENT: create or replace function response.set_header(name text, value text) returns void as $$ │
│ select set_config( │
│ 'response.headers', │
│ jsonb_insert( │
│ (case coalesce(current_setting('response.headers',true),'') │
│ when '' then '[]' │
│ else current_setting('response.headers') │
│ end)::jsonb, │
│ '{0}'::text[], │
│ jsonb_build_object(name, value))::text, │
│ true │
│ ); │
│ $$ stable language sql; │
│psql:/docker-entrypoint-initdb.d/libs/response/schema.sql:35: ERROR: return type mismatch in function declared to return void │
│DETAIL: Actual return type is text. │
│CONTEXT: SQL function "set_header"
I assume that is because the return type of the set_config function is actually text.
What do you think could be the cause for me running into this problem?
€: same problem with the set_cookie and delete_cookie function
The text was updated successfully, but these errors were encountered:
oakgary
changed the title
set_header function of response lib missmatch in return type
missmatches in return types of response lib functions
Aug 18, 2020
as discussed with @ruslantalpa in slack it is probably the postgres version; note: we did not verify this
i am using 10.9, while the starter-kit uses 11.x which seems to have become less strict
changing the return type of the three mentioned functions to text fixes the errors
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Trying to add the response lib to my environment I run into the following error:
I assume that is because the return type of the set_config function is actually text.
What do you think could be the cause for me running into this problem?
€: same problem with the set_cookie and delete_cookie function
The text was updated successfully, but these errors were encountered: