|
|
|
@ -286,16 +286,21 @@ class PostgreSQLCache: public GenericCache
|
|
|
|
|
if(!regdest) |
|
|
|
|
{ |
|
|
|
|
// Create table
|
|
|
|
|
if(false) |
|
|
|
|
{ |
|
|
|
|
auto* res = PQexec(conn, "SET client_min_messages=WARNING;"); |
|
|
|
|
PQclear(res); |
|
|
|
|
} |
|
|
|
|
{ |
|
|
|
|
auto* res = PQexec(conn, "CREATE TABLE IF NOT EXISTS cache(key TEXT PRIMARY KEY NOT NULL, value BYTEA, exptime TIMESTAMP(0) NOT NULL);"); |
|
|
|
|
if(PQresultStatus(res) != PGRES_COMMAND_OK) |
|
|
|
|
{ |
|
|
|
|
michlib::errmessage(PQresStatus(PQresultStatus(res))); |
|
|
|
|
michlib::errmessage(PQerrorMessage(conn)); |
|
|
|
|
} |
|
|
|
|
PQclear(res); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
auto* res = PQexec(conn, "SET client_min_messages=NOTICE;"); |
|
|
|
|
PQclear(res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|