Nginx postgres problem

Yichun Zhang (agentzh) agentzh at
Tue Mar 4 23:19:23 UTC 2014


On Tue, Mar 4, 2014 at 7:15 AM, arunh wrote:
> But when I try to print the value of "$1" variable and also after assigning
> it to the variable "$tenantID" I do get the value.
> I guess in the eval block the postgres_escape is not getting set.

The "eval" directive always runs before the directives of the standard
ngx_rewrite module. No matter in what order you write them down in

As a co-maintainer of ngx_postgres, I recommend you use ngx_lua module
to communicate with ngx_postgres.

Basically you can use rewrite_by_lua to inject some Lua code and use
ngx.location.capture to issue a subrequest to your postgres location.


More information about the nginx mailing list