Skip to content
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

Return to GUC for CURL options? #89

Open
pramsey opened this issue Nov 9, 2018 · 0 comments
Open

Return to GUC for CURL options? #89

pramsey opened this issue Nov 9, 2018 · 0 comments
Assignees

Comments

@pramsey
Copy link
Owner

pramsey commented Nov 9, 2018

The GUC system doesn't require the variable names to be preconfigured if they are under a prefix, so the following works:

http=# set http.foobar = 'this';
SET
http=# show http.foobar;
 http.foobar 
-------------
 this
(1 row)

In combination with this PostgreSQL function

const char *
GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)

It should be possible to just have GUC variables for all the CURL opts we want to support. This wouldn't allow arbitrary CURL option setting, as only options we allowed in the code would be available.

It would then be possible to persist option setting over multiple sessions:

alter database http set http.fooBar = 126;

Note that the GUC names are case insensitive, so that quirk is automatically handled for us too. Kind of wish I had done this to start with.

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

No branches or pull requests

1 participant