.. efun:: string pg_conv_string(string str) :optional: Convert the string :arg:`str` into a string that is correctly interpretated for usage as a string in :efun:`pg_query`, e.g. ``'`` is replaced with ``\'`` and so on. .. todo:: interpretated above _looks_ like a typo of interpreted, but in context I suspect it's actually interpolated? The function is available only if the driver is compiled with PostgreSQL support. In that case, :macro:`__PGSQL__` is defined. The efun triggers a privilege violation ("pgsql", "pg_connect"). :history 3.3.708 introduced: .. seealso:: :concept:`pgsql`, :efun:`pg_query`, :efun:`pg_pending`, :efun:`pg_conv_string`, :efun:`pg_close`, :master:`privilege_violation`