Add PL/Python functions for quoting strings

Peter Eisentraut <peter_e@gmx.net>

Commit: 1c51c7d5ffd407426f314b2cd317ef77f14efb1f
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2011-02-22T21:41:23Z
Releases: 9.1.0
Add PL/Python functions for quoting strings

Add functions plpy.quote_ident, plpy.quote_literal,
plpy.quote_nullable, which wrap the equivalent SQL functions.

To be able to propagate char * constness properly, make the argument
of quote_literal_cstr() const char *.  This also makes it more
consistent with quote_identifier().

Jan Urbański, reviewed by Hitoshi Harada, some refinements by Peter
Eisentraut

Files