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
It seems there's no such hook in ngx_postgres to allow custom queries to be sent upon upstream connection establishment.
I am trying out ngx_postgres with pgrest (http://github.com/clkao/pgrest). However for each connection, we need to call a postgresql function via select, something like: SELECT pgrest_boot('{...bootstrap_json}').
I also tried calling the bootstrap function along with other queries mapped from GET requests, but ngx_postgres is not handling multiple queries very well.
The text was updated successfully, but these errors were encountered:
Thanks @agentzh! I gave it a quick try, it seems postgres_pass can't be used with echo_location, so i have to create a wrapper route that contains two echo_location to the to routes for doing bootstrap and the actual query.
I then use postgres_output none for the first location so only the second one is rendered. however it seems I now get a response where the body is flushed before the http headers.
@clkao echo_location should work with ngx_postgres but you need separate locations because you're doing Nginx subrequests here. For a single location, you cannot enable two Nginx module's content handlers at the same time, that is, you cannot use echo_location and proxy_pass in a single location.
It seems there's no such hook in ngx_postgres to allow custom queries to be sent upon upstream connection establishment.
I am trying out ngx_postgres with pgrest (http://github.com/clkao/pgrest). However for each connection, we need to call a postgresql function via select, something like: SELECT pgrest_boot('{...bootstrap_json}').
I also tried calling the bootstrap function along with other queries mapped from GET requests, but ngx_postgres is not handling multiple queries very well.
The text was updated successfully, but these errors were encountered: