summaryrefslogtreecommitdiff
path: root/lib/output
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output')
-rw-r--r--lib/output/pq/pqConn.cpp2
-rw-r--r--lib/output/pq/pqConn.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/output/pq/pqConn.cpp b/lib/output/pq/pqConn.cpp
index c1a7362..309b704 100644
--- a/lib/output/pq/pqConn.cpp
+++ b/lib/output/pq/pqConn.cpp
@@ -15,7 +15,7 @@ namespace MyGrate::Output::Pq {
{
}
- PqConn::PqConn(const char * const str) : conn {PQconnectdb(str), PQfinish}
+ PqConn::PqConn(const char * const str) : connstr {str}, conn {PQconnectdb(str), PQfinish}
{
verify<PqErr>(PQstatus(conn.get()) == CONNECTION_OK, "Connection failure", conn.get());
PQsetNoticeProcessor(conn.get(), notice_processor, this);
diff --git a/lib/output/pq/pqConn.h b/lib/output/pq/pqConn.h
index b8609ea..6db9bcf 100644
--- a/lib/output/pq/pqConn.h
+++ b/lib/output/pq/pqConn.h
@@ -32,6 +32,8 @@ namespace MyGrate::Output::Pq {
DbPrepStmtPtr prepare(const char * const, std::size_t nParams) override;
+ const std::string connstr;
+
private:
static void notice_processor(void *, const char *);
virtual void notice_processor(const char *) const;