Skip to content

Feature request: option to change default quote style for set_quote_sql_str #1

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

Closed
cwells opened this issue Aug 17, 2010 · 1 comment

Comments

@cwells
Copy link

cwells commented Aug 17, 2010

The extra "for" parameter causes incompatibilities with other modules, for instance:

array_map_op set_quote_sql_str for=pg $array;

generates an error.

It would be nice if default of MySQL could be changed with directive, e.g.:

set_quote_style pgsql;      ## or set_quote_style mysql
array_map_op set_quote_sql_str $array;
@agentzh
Copy link
Member

agentzh commented Aug 18, 2010

Yeah, I've also fixed it in v0.12. Now we no longer support the for=pg option in the set_quote_sql_str directive, it will always stick to mysql's quoting method. For PostgreSQL literals, we introduce a new set_quote_pgsql_str directive that can be combined with ngx_array's array_map_op, for instance,

array_map_op set_quote_pgsql_str $my_array;

Could you try this out?

Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants