Skip to content

Commit

Permalink
Postgresql adapter bug fix (#66)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cgunnels authored Sep 27, 2024
1 parent bae1232 commit c7beab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Adapters/PgsqlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}')";
}
}

0 comments on commit c7beab3

Please # to comment.