Skip to content

Hello (postgres 9.4 compatibility) #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jcleiva opened this issue Aug 23, 2018 · 4 comments
Open

Hello (postgres 9.4 compatibility) #2

jcleiva opened this issue Aug 23, 2018 · 4 comments

Comments

@jcleiva
Copy link

jcleiva commented Aug 23, 2018

Having some sql stament errors

@jcleiva
Copy link
Author

jcleiva commented Aug 23, 2018

This sql statement
coalesce(nullif(current_setting('http_client.default_headers'), ''), '{}')::jsonb || coalesce(headers, '{}'::jsonb)
gives this error
operator does not exist: jsonb || jsonb
I'm using psql (9.4.19)

Also this sql statement
coalesce(nullif(current_setting('http_client.connect_timeout', true), ''), '2')::integer
gives this error
No function matches the given name and argument types. You might need to add explicit type casts
I change it to
coalesce(nullif(current_setting('http_client.connect_timeout'), ''), '2')::integer, and it worked

Thanks

@NikolayS
Copy link
Owner

@jcleiva, thank you for your comments!

The operator || for jsonb and json types was added only in Postgres 9.5.

As for current_setting(..) function, its second parameter was added in 9.6, and it's very helpful because it allows defining "default" value.

I'm afraid, I won't be able to add backward compatibility for Postgres versions < 9.6 due to lack of time.

Can you upgrade?

@NikolayS NikolayS changed the title Hello Hello (postgres 9.4 compatibility) Aug 26, 2018
@NikolayS
Copy link
Owner

FYI: I've added a note to README, that postgres 9.6+ is required.

@NikolayS NikolayS added wontfix and removed wontfix labels Aug 26, 2018
@jcleiva
Copy link
Author

jcleiva commented Aug 27, 2018

Thanks for your reply,
Ok, I will try it using postgresql 10.

I will let you know

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants