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
@nbhatti Sure. You can use the ngx.location.capture to initiate nginx subrequest to a (internal) location configured by ngx_postgres. AFAIK, qunar.com has been using this approach in production for years already :)
@agentzh Do you have an example? I want to manage db connection and everything inside the Lua script and not in nginx directives. Currently I am just passing everything to content_by_lua_file and initiate the db connection and complete the script. Is that aso doable with ngx.location.capture?
@nbhatti Then you should not use ngx_postgres in the first place. There're some 3rd-party pure Lua PostgreSQL client libraries based on ngx_lua's nonblocking cosocket API, for example,
I am using currently using content_by_lua_file, so I was thinking if I can use the module from the lua script itself?
The text was updated successfully, but these errors were encountered: