Skip to content

Commit

Permalink
Recommend dollar-quoting if hypo index needs literals.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjuju committed Apr 27, 2024
1 parent d102c8a commit 8943fd0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -68,6 +68,12 @@ You can check the available hypothetical indexes in your own backend:
------------+-------------------------------+-------------+------------+---------
50573 | <50573>btree_hypo_id | public | hypo | btree

If the `CREATE INDEX` command you want to use also needs quoting, using the
[dollar quoting
syntax](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING)
is recommended. For instance:

rjuju=# SELECT * FROM hypopg_create_index($$CREATE INDEX ON hypo (id) WHERE val = 'line 1'$$);

If you need more technical information on the hypothetical indexes, the
`hypopg()` function will return the hypothetical indexes in a similar way as
Expand Down

0 comments on commit 8943fd0

Please sign in to comment.