From 712960df1826305def34df4b6dd5c4343b8ec09d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 9 May 2019 20:35:52 +0100 Subject: Create mock databases in a temporary directory Requires v9.3 server for COPY ... TO PROGRAM ... support, which is used to get the server to create a directory with suitable permissions. This directory is created in the system temporary directory and used as the default tablespace for the mock database. --- libpqpp/pq-mock.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpqpp/pq-mock.h') diff --git a/libpqpp/pq-mock.h b/libpqpp/pq-mock.h index c802080..b5f4f24 100644 --- a/libpqpp/pq-mock.h +++ b/libpqpp/pq-mock.h @@ -15,8 +15,11 @@ namespace PQ { DB::ConnectionPtr openConnection() const override; protected: + void CreateNewDatabase() const override; void DropDatabase() const override; void SetTablesToUnlogged() const; + bool hasCopyToProgram() const; + const std::filesystem::path tablespacePath; const int serverVersion; }; } -- cgit v1.2.3