From 02908bb8ba73dd1d67d17749d61b5909df2d05b4 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Sat, 23 May 2020 17:04:09 +0200 Subject: [PATCH] Sql.postgres: Only inherit Sql.pgsql if it exists --- lib/modules/Sql.pmod/postgres.pike | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/modules/Sql.pmod/postgres.pike b/lib/modules/Sql.pmod/postgres.pike index aa853735af..25f935945c 100644 --- a/lib/modules/Sql.pmod/postgres.pike +++ b/lib/modules/Sql.pmod/postgres.pike @@ -461,7 +461,7 @@ int|object streaming_query(object|string q, return big_query(q, bindings); } -#else +#elif constant(Sql.pgsql) /* * If libpq wasn't available at compile time, the pgsql-module can provide * near the same functionality as the postgres module. @@ -479,4 +479,6 @@ int|object streaming_query(object|string q, //! @seealso //! @[Sql.pgsql], @[Sql.Sql] inherit Sql.pgsql; -#endif /* constant(Postgres.postgres) */ +#else /* constant(Sql.pgsql) */ +constant this_program_does_not_exist = 1; +#endif -- GitLab