-
Notifications
You must be signed in to change notification settings - Fork 122
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
multiple postgres_query in location? #37
Comments
ping? |
@msva AFAIK, multiple postgres queries are not really supported in this module. |
yes, they aren't ;) But README says:
Which means the opposite ;) |
@msva I didn't write that document :) My hunch is that this might be a copy&paste mistake. |
Btw, I can send PR with change, that will allow it to be declared multiple times (but is it really needed?..) Although, it is also strange, that "_pass" can be specified only in location/if_loc, while "_query" can be specified in upper blocks ;) |
@msva I think maybe we should just fix the docs for now ;) |
It would be very useful to have multiple postgres_queries per location. I'm working on a REST-like app and am trying to achieve something like the following MWE:
...and breaking it into two separate postgres_query directives has the problem @msva already described. At the moment I guess I need to fall back on either using a Is there a reason that adding such functionality to the module is opening a can of worms, or would it be relatively straightforward and side-effect-free? @msva, when you say you could send a PR, do you already have a patch ready? I'd personally love to see it as a gist if so, even if not as a PR... |
No, I meant that I can try to work on this a bit. Although, I already tried and given up (I was lack of free time to find a proper way to implement that) 🤕. |
Hi!
The README, in the
postgres_query
section says "This directive can be used more than once within same context."Although, when I trying to add multiple
postgres_query
directives inside the location (on NginX 1.9.0), I get:is it a bug or does README lie?
The text was updated successfully, but these errors were encountered: