mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where Foreign Key with 3 or more columns are shown in the wrong order in SQL and Properties. #6345
This commit is contained in:
parent
99d1c99963
commit
149e093c88
@ -29,3 +29,4 @@ Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #6136 <https://github.com/pgadmin-org/pgadmin4/issues/6136>`_ - Fix an issue where editing a database object de-selects it on the browser tree.
|
||||
| `Issue #6345 <https://github.com/pgadmin-org/pgadmin4/issues/6345>`_ - Fixed an issue where Foreign Key with 3 or more columns are shown in the wrong order in SQL and Properties.
|
||||
|
@ -1,10 +1,9 @@
|
||||
{% for keypair in keys %}
|
||||
{% if loop.index != 1 %}
|
||||
UNION
|
||||
UNION ALL
|
||||
{% endif %}
|
||||
SELECT a1.attname as conattname,
|
||||
a2.attname as confattname,
|
||||
a1.attnum as attnum
|
||||
a2.attname as confattname
|
||||
FROM pg_catalog.pg_attribute a1,
|
||||
pg_catalog.pg_attribute a2
|
||||
WHERE a1.attrelid={{tid}}::oid
|
||||
@ -12,4 +11,3 @@ WHERE a1.attrelid={{tid}}::oid
|
||||
AND a2.attrelid={{confrelid}}::oid
|
||||
AND a2.attnum={{keypair[0]}}
|
||||
{% endfor %}
|
||||
ORDER BY attnum;
|
||||
|
Loading…
Reference in New Issue
Block a user