Pg: Add escape_literal() and escape_identifier()

Didn't expect I'd ever need these, but they're useful for generating SQL
scripts.
This commit is contained in:
Yorhel 2025-04-07 13:45:24 +02:00
parent 3bf98e4d8f
commit b3281924d1
4 changed files with 41 additions and 0 deletions

View file

@ -43,6 +43,8 @@ typedef enum { PQTRANS_IDLE, PQTRANS_ACTIVE, PQTRANS_INTRANS, PQTRANS_INERROR, P
X(PQconnectdb, PGconn *, const char *) \
X(PQenterPipelineMode, int, PGconn *) \
X(PQerrorMessage, char *, const PGconn *) \
X(PQescapeIdentifier, char *, PGconn *, const char *, size_t) \
X(PQescapeLiteral, char *, PGconn *, const char *, size_t) \
X(PQexec, PGresult *, PGconn *, const char *) \
X(PQexecParams, PGresult *, PGconn *, const char *, int, const Oid *, const char * const *, const int *, const int *, int) \
X(PQexecPrepared, PGresult *, PGconn *, const char *, int, const char * const *, const int *, const int *, int) \