pg: ->disconnect() and docs

This commit is contained in:
Yorhel 2025-02-07 10:49:47 +01:00
parent 171afc0268
commit 96aee880ce
3 changed files with 152 additions and 3 deletions

View file

@ -94,6 +94,11 @@ static const char *fupg_status(fupg_conn *c) {
}
}
static void fupg_disconnect(fupg_conn *c) {
PQfinish(c->conn);
c->conn = NULL;
}
static void fupg_destroy(fupg_conn *c) {
PQfinish(c->conn);
safefree(c);
@ -160,8 +165,8 @@ typedef struct {
SV **bind;
int bindn;
/* Set during prepare */
char name[32];
int prepared;
char name[32];
PGresult *describe;
/* Set during execute */
int paramn;