Skip to content

Commit 8943fd0

Browse files
committed
Recommend dollar-quoting if hypo index needs literals.
1 parent d102c8a commit 8943fd0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ You can check the available hypothetical indexes in your own backend:
6868
------------+-------------------------------+-------------+------------+---------
6969
50573 | <50573>btree_hypo_id | public | hypo | btree
7070

71+
If the `CREATE INDEX` command you want to use also needs quoting, using the
72+
[dollar quoting
73+
syntax](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING)
74+
is recommended. For instance:
75+
76+
rjuju=# SELECT * FROM hypopg_create_index($$CREATE INDEX ON hypo (id) WHERE val = 'line 1'$$);
7177

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

0 commit comments

Comments
 (0)