mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-23 01:06:31 -06:00
Don't specify ASC/DESC options for index types that don't support them. Fixes #1840
This commit is contained in:
parent
6874a1a247
commit
06039320b9
@ -3,8 +3,8 @@ CREATE {% if data.indisunique %}UNIQUE {% endif %}INDEX {% if data.isconcurrent
|
||||
|
||||
{% if mode == 'create' %}
|
||||
({% for c in data.columns %}{% if loop.index != 1 %}, {% endif %}{{conn|qtIdent(c.colname)}}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.op_class %}
|
||||
{{c.op_class}}{% endif %}{% if c.sort_order is defined %}{% if c.sort_order %} DESC{% else %} ASC{% endif %}{% endif %}{% if c.nulls is defined %} NULLS {% if c.nulls %}
|
||||
FIRST{% else %}LAST{% endif %}{% endif %}{% endfor %})
|
||||
{{c.op_class}}{% endif %}{% if data.amname is defined and data.amname not in ['gist', 'gin'] %}{% if c.sort_order is defined %}{% if c.sort_order %} DESC{% else %} ASC{% endif %}{% endif %}{% if c.nulls is defined %} NULLS {% if c.nulls %}
|
||||
FIRST{% else %}LAST{% endif %}{% endif %}{% endif %}{% endfor %})
|
||||
{% else %}
|
||||
{## We will get indented data from postgres for column ##}
|
||||
({% for c in data.columns %}{% if loop.index != 1 %}, {% endif %}{{c.colname}}{% if c.collspcname %} COLLATE {{c.collspcname}}{% endif %}{% if c.op_class %}
|
||||
@ -16,4 +16,4 @@ FIRST{% else %}LAST{% endif %}{% endif %}{% endfor %})
|
||||
{% endif %}{% if data.spcname %}
|
||||
TABLESPACE {{conn|qtIdent(data.spcname)}}{% endif %}{% if data.indconstraint %}
|
||||
WHERE {{data.indconstraint}}
|
||||
{% endif %};
|
||||
{% endif %};
|
||||
|
Loading…
Reference in New Issue
Block a user