Hello!
On Fri, Nov 22, 2013 at 10:23 AM, Roberto Ostinelli wrote:
> I've seen that to use pgsql you need to install the postgresql module, the
> drizzle module, then use the RDSjson module to interpret the results.
>
Nah, you don't need the ngx_drizzle module for PostgreSQL
communication at all because ngx_drizzle is a MySQL driver :)
It seems that you missed the 3rd-party lua-resty-postgres library
contributed by Azure Wang:
https://github.com/azurewang/lua-resty-postgres
I have not read its source or used it myself yet, but it is worth trying :)
>
> Is something like this coming soon?
An official implementation of lua-resty-postgresql has been on my TODO
list for long ;) Because our company (CloudFlare) is also using
PostgreSQL, I'd expect it to be coming soon (but not very soon) :)
I'm currently focusing on LuaJIT 2.1 integration and lua-resty-core
development, under the name of more speed :)
> Or else, can someone please point me to
> an example on how to use postgresql + drizzle + RDSjson?
>
If you want to use ngx_postgres from within your Lua code running atop
ngx_lua, then you're encouraged to use the lua-rds-parser library to
parse the raw RDS output from ngx_postgres directly (that is, without
using ngx_rds_json at all). See
https://github.com/agentzh/lua-rds-parser#readme
It's more efficient to use JSON as an (extra) intermediate data format.
Regards,
-agentzh