Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix copy buttons on Trigram Indexes page #19251

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/current/v23.1/trigram-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,36 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching](

Suppose you have a table with the following columns:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE TABLE t (a INT, w STRING);
~~~

The following examples illustrate how to create various trigram indexes on column `w`.

A GIN index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops);
~~~

A partial index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0;
~~~

A multi-column index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (a, w gin_trgm_ops);
~~~

An expression index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN ((json_col->>'json_text_field'))
Expand Down
5 changes: 5 additions & 0 deletions src/current/v23.2/trigram-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,36 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching](

Suppose you have a table with the following columns:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE TABLE t (a INT, w STRING);
~~~

The following examples illustrate how to create various trigram indexes on column `w`.

A GIN index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops);
~~~

A partial index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0;
~~~

A multi-column index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (a, w gin_trgm_ops);
~~~

An expression index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN ((json_col->>'json_text_field'))
Expand Down
5 changes: 5 additions & 0 deletions src/current/v24.1/trigram-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,36 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching](

Suppose you have a table with the following columns:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE TABLE t (a INT, w STRING);
~~~

The following examples illustrate how to create various trigram indexes on column `w`.

A GIN index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops);
~~~

A partial index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0;
~~~

A multi-column index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (a, w gin_trgm_ops);
~~~

An expression index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN ((json_col->>'json_text_field'))
Expand Down
5 changes: 5 additions & 0 deletions src/current/v24.2/trigram-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,36 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching](

Suppose you have a table with the following columns:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE TABLE t (a INT, w STRING);
~~~

The following examples illustrate how to create various trigram indexes on column `w`.

A GIN index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops);
~~~

A partial index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0;
~~~

A multi-column index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (a, w gin_trgm_ops);
~~~

An expression index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN ((json_col->>'json_text_field'))
Expand Down
5 changes: 5 additions & 0 deletions src/current/v24.3/trigram-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,36 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching](

Suppose you have a table with the following columns:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE TABLE t (a INT, w STRING);
~~~

The following examples illustrate how to create various trigram indexes on column `w`.

A GIN index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops);
~~~

A partial index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0;
~~~

A multi-column index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN (a, w gin_trgm_ops);
~~~

An expression index with trigram matching enabled:

{% include_cached copy-clipboard.html %}
~~~ sql
CREATE INDEX ON t USING GIN ((json_col->>'json_text_field'))
Expand Down
Loading