FRiCKLE pres. ngx_postgres

agentzh agentzh at gmail.com
Thu Dec 23 06:38:03 MSK 2010


On Thu, Dec 23, 2010 at 11:27 AM, Piotr Sikora <piotr.sikora at frickle.com> wrote:
> 2010-12-23    VERSION 0.8
>   * Add option to return content in binary format using
>     "binary_value" output format in "postgres_output" directive.
>     Mostly done by Yichun Zhang (agentzh).
>

Just a brief note on this:

I originally introduced this just because Qunar.com (the biggest
air-ticket search engine here in China) is storing (small) images into
their PostgreSQL databases, and they'd like to serve out the images
directly to the web browsers, and without introducing any extra middle
layers to maximize speed.

> 2010-11-01
>   * Support "postgres_pass", "postgres_query", "postgres_rewrite"
>     and "postgres_output" directives in "if" pseudo-locations.
>     From Yichun Zhang (agentzh).
>

This allows simple code branches by using nginx's if mechanism. And
yeah, nginx's "if" is evil but it can make simple things easy. It's
recommended to use ngx_lua's set_by_lua and other stuffs to do
complicated code branching though :)

Cheers,
-agentzh



More information about the nginx mailing list