Error in ORDER BY on check constraints in psql

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Error in ORDER BY on check constraints in psql
Дата
Msg-id 435725A1.5070900@familyhealth.com.au
обсуждение исходный текст
Ответы Re: Error in ORDER BY on check constraints in psql
Список pgsql-patches
Everything is sorted by object name in \d <table> except check
constraints for some reason.  It seems it's ordering by the wrong column.

Seems like a bug to me.

Attached is the trivial patch.

Chris
Index: src/bin/psql/describe.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/describe.c,v
retrieving revision 1.127
diff -c -r1.127 describe.c
*** src/bin/psql/describe.c    15 Oct 2005 02:49:40 -0000    1.127
--- src/bin/psql/describe.c    20 Oct 2005 04:58:58 -0000
***************
*** 1040,1046 ****
                                "pg_catalog.pg_get_constraintdef(r.oid, true), "
                                "conname\n"
                                "FROM pg_catalog.pg_constraint r\n"
!                     "WHERE r.conrelid = '%s' AND r.contype = 'c' ORDER BY 1",
                                oid);
              result2 = PSQLexec(buf.data, false);
              if (!result2)
--- 1040,1046 ----
                                "pg_catalog.pg_get_constraintdef(r.oid, true), "
                                "conname\n"
                                "FROM pg_catalog.pg_constraint r\n"
!                     "WHERE r.conrelid = '%s' AND r.contype = 'c' ORDER BY 2",
                                oid);
              result2 = PSQLexec(buf.data, false);
              if (!result2)

В списке pgsql-patches по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Small plperl documentation patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error in ORDER BY on check constraints in psql