Skip to content
Open
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
Binary file modified docs/en_US/images/index_definition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/index_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/index_sql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/index_with.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 21 additions & 12 deletions docs/en_US/index_dialog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,27 @@ Use the fields in the *Definition* tab to define the index:
* Use the drop-down listbox next to *Depends on extensions* to select the extension
that this index depends on (for example, edbspl). If set, dropping the extension
will automatically drop the index as well.
* Move the switch next to *Only Table?* to the *Yes* position to create the index
only on the parent table without recursing to its partitions. The default is *No*.
* Move the switch next to *Unique?* to the *Yes* position to check for duplicate values
in the table when the index is created and when data is added. The default is *No*.
* Move the switch next to *NULLs not distinct?* to the *Yes* position to treat null values as not distinct.
The default is *No*. This option is available only on PostgreSQL 15 and above.
* Move the *Clustered?* switch to the *Yes* position to instruct the server to
cluster the table.
* Move the *Concurrent build?* switch to the *Yes* position to build the index
without taking any locks that prevent concurrent inserts, updates, or deletes
on the table.
* Use the *Constraint* field to provide a constraint expression; a constraint
expression limits the entries in the index to those rows that satisfy the
constraint.

Click the *With* tab to continue.

.. image:: images/index_with.png
:alt: Index dialog with tab
:align: center

* Use the *Fill Factor* field to specify a fill factor for the index. The fill
factor specifies how full the selected method will try to fill each index
page.
Expand All @@ -66,18 +87,6 @@ Use the fields in the *Definition* tab to define the index:
The default is *Yes*.
* Move the switch next to *Autosummarize* to the *Yes* position to define whether a summarization run is
queued for the previous page range whenever an insertion is detected on the next one. The default is *No*
* Move the switch next to *Unique?* to the *Yes* position to check for duplicate values
in the table when the index is created and when data is added. The default is *No*.
* Move the switch next to *NULLs not distinct?* to the *Yes* position to treat null values as not distinct.
The default is *No*. This option is available only on PostgreSQL 15 and above.
* Move the *Clustered?* switch to the *Yes* position to instruct the server to
cluster the table.
* Move the *Concurrent build?* switch to the *Yes* position to build the index
without taking any locks that prevent concurrent inserts, updates, or deletes
on the table.
* Use the *Constraint* field to provide a constraint expression; a constraint
expression limits the entries in the index to those rows that satisfy the
constraint.

Click the *Columns* tab to continue.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ export default class IndexSchema extends BaseUISchema {
amname: undefined,
fastupdate: false,
autosummarize: false,
indisonly: false,
columns: [],
...initValues
});
Expand Down Expand Up @@ -522,7 +523,20 @@ export default class IndexSchema extends BaseUISchema {
mode: ['create', 'edit', 'properties']
},
{
type: 'nested-fieldset', label: gettext('With'), group: gettext('Definition'),
id: 'indisonly', label: gettext('Only Table?'),
type: 'switch', group: gettext('Definition'),
disabled: () => {
// ONLY is only applicable to partitioned tables
// Disable if not a partitioned table or if viewing in schema (view mode)
return inSchema(indexSchemaObj.node_info) ||
!indexSchemaObj.node_info?.table?.is_partitioned;
},
mode: ['create'],
min_version: 110000,
helpMessage: gettext('When enabled, the index will only be created on this table, not on its partitions.'),
},
{
type: 'nested-fieldset', label: gettext('With'), group: gettext('With'),
schema: this.withSchema,
},{
id: 'indisunique', label: gettext('Unique?'), cell: 'string',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE{% if data.indisunique %} UNIQUE{% endif %} INDEX{% if add_not_exists_clause %} IF NOT EXISTS{% endif %}{% if data.isconcurrent %} CONCURRENTLY{% endif %}{% if data.name %} {{conn|qtIdent(data.name)}}{% endif %}

ON {{conn|qtIdent(data.schema, data.table)}} {% if data.amname %}USING {{conn|qtIdent(data.amname)}}{% endif %}
ON {% if data.indisonly %}ONLY {% endif %}{{conn|qtIdent(data.schema, data.table)}} {% if data.amname %}USING {{conn|qtIdent(data.amname)}}{% endif %}

{% if mode == 'create' %}
({% for c in data.columns %}{% if loop.index != 1 %}, {% endif %}{% if c.is_exp %}({{c.colname}}){% else %}{{conn|qtIdent(c.colname)}}{% endif %}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.op_class %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE{% if data.indisunique %} UNIQUE{% endif %} INDEX{% if add_not_exists_clause %} IF NOT EXISTS{% endif %}{% if data.isconcurrent %} CONCURRENTLY{% endif %}{% if data.name %} {{conn|qtIdent(data.name)}}{% endif %}

ON {{conn|qtIdent(data.schema, data.table)}} {% if data.amname %}USING {{conn|qtIdent(data.amname)}}{% endif %}
ON {% if data.indisonly %}ONLY {% endif %}{{conn|qtIdent(data.schema, data.table)}} {% if data.amname %}USING {{conn|qtIdent(data.amname)}}{% endif %}

{% if mode == 'create' %}
({% for c in data.columns %}{% if loop.index != 1 %}, {% endif %}{% if c.is_exp %}({{c.colname}}){% else %}{{conn|qtIdent(c.colname)}}{% endif %}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.op_class %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE{% if data.indisunique %} UNIQUE{% endif %} INDEX{% if add_not_exists_clause %} IF NOT EXISTS{% endif %}{% if data.isconcurrent %} CONCURRENTLY{% endif %}{% if data.name %} {{conn|qtIdent(data.name)}}{% endif %}

ON {{conn|qtIdent(data.schema, data.table)}} {% if data.amname %}USING {{conn|qtIdent(data.amname)}}{% endif %}
ON {% if data.indisonly %}ONLY {% endif %}{{conn|qtIdent(data.schema, data.table)}} {% if data.amname %}USING {{conn|qtIdent(data.amname)}}{% endif %}

{% if mode == 'create' %}
({% for c in data.columns %}{% if loop.index != 1 %}, {% endif %}{% if c.is_exp %}({{c.colname}}){% else %}{{conn|qtIdent(c.colname)}}{% endif %}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.op_class %}
Expand Down
Loading