Closed wasade closed 9 years ago
@wasade That directive is provided by the ngx_eval module:
https://github.com/openresty/nginx-eval-module
Try including this module in your nginx or openresty build.
Right, its supposed to be included in openresty but it doesn't appear to work, or am I missing something obvious? On Jul 28, 2015 12:03 AM, "Yichun Zhang" notifications@github.com wrote:
Closed #40 https://github.com/FRiCKLE/ngx_postgres/issues/40.
— Reply to this email directly or view it on GitHub https://github.com/FRiCKLE/ngx_postgres/issues/40#event-366854098.
@wasade No. The ngx_eval module is not a default OpenResty component on purpose. Please see
https://openresty.org/#Components
It's not included because use of ngx_lua is recommended instead of ngx_eval. The ngx_eval module is the old day solution. See the corresponding documentation of my fork of ngx_eval:
https://github.com/openresty/nginx-eval-module#use-lua-instead
Thanks, @agentzh. I confess, I'm not seeing any text on that openresty link regarding "ngx_eval" or even "eval" which perhaps is driving some of the confusion. Thanks for the link on using "ngx_lua" -- that looks like it'll do what I need. Sorry for the confusion and thank you for the rapid responses!
@wasade Yes, the examples in ngx_postgrres's README deserves treatment to avoid such confusions.
I'm unable to get something like sample configuration #3 to work. I apologize in advance if this question is a bit naive -- I'm not extremely familiar with nginx. When I include
eval_subrequest_in_memory off;
or the subsequent directives, I receive:I'm using openresty, and from what I'm reading, it sounds like nginx-eval-module (agentzh's fork) is part of openresty. Below are the relevant version details and modules:
Bigger picture, what I'd like to do is source a URL from a table and redirect for a download. I'm less concerned about how this is accomplished, and more concerned about being able to do it. As a practical example, say I have the following table:
What I'd like to be able to do from nginx is something along these lines:
...however, I realize that (for reasons I don't fully grok) that
return
and thepostgres_*
statements aren't compatible due to how nginx processes things.Any help would be greatly appreciated, thanks!