Skip to content

Commit 7eba3ca

Browse files
PostgreSQL: Parse optimizer hints in leading comments (#2320)
1 parent fa1dae1 commit 7eba3ca

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/dialect/postgresql.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,4 +318,12 @@ impl Dialect for PostgreSqlDialect {
318318
fn supports_xml_expressions(&self) -> bool {
319319
true
320320
}
321+
322+
/// Postgres supports query optimizer hints via the `pg_hint_plan` extension,
323+
/// using the same comment-prefixed-with-`+` syntax as MySQL and Oracle.
324+
///
325+
/// See <https://github.com/ossc-db/pg_hint_plan>
326+
fn supports_comment_optimizer_hint(&self) -> bool {
327+
true
328+
}
321329
}

0 commit comments

Comments
 (0)