From a256b26c4156e1a73303bd8bbdb62c62727f954a Mon Sep 17 00:00:00 2001 From: Chris Gunnels Date: Mon, 27 May 2024 13:07:40 -0600 Subject: [PATCH] Postgresql adapter bug fix Wrapped the column in double quotes as it is required by Postgres PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit --- src/Adapters/PgsqlAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapters/PgsqlAdapter.php b/src/Adapters/PgsqlAdapter.php index 47e44b1..e2b257f 100644 --- a/src/Adapters/PgsqlAdapter.php +++ b/src/Adapters/PgsqlAdapter.php @@ -17,6 +17,6 @@ public function format(string $column, string $interval): string default => throw new Error('Invalid interval.'), }; - return "to_char({$column}, '{$format}')"; + return "to_char(\"{$column}\", '{$format}')"; } }