Re: CVS Commit by dpage: Prevent duplication of functional indexes

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: CVS Commit by dpage: Prevent duplication of functional indexes
Дата
Msg-id 03AF4E498C591348A42FC93DEA9661B889FC29@mail.vale-housing.co.uk
обсуждение исходный текст
Ответ на CVS Commit by dpage: Prevent duplication of functional indexes  (cvs@cvs.pgadmin.org)
Список pgadmin-hackers

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 04 May 2004 13:43
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] CVS Commit by dpage: Prevent
> duplication of functional indexes
>
> cvs@cvs.pgadmin.org wrote:
>
> >-        wxT(" ORDER BY cls.relname"));
> >+        wxT(" ORDER BY cls.oid, cls.relname"));
> >
> >
>
> Hi Dave,
> did you find out what makes the result duplicate? Maybe the
> query is written in a somehow unfortunate way, and could be
> properly rewritten?

It's caused by the additional pg_depend entry for the function used by
the index. I could see no easy way to get rid of it and no obvious
reason why a DISTINCT might cause problems in this case.

> The ORDER BY should probably read ORDER BY cls.relname,
> cls.oid to remain alphabetical ordering.

Hmm, good point. DISTINCT ON(cls.relname) should be OK as well I guess
(there should only ever be one index with a given name)....

Regards, Dave.

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

Предыдущее
От: cvs@cvs.pgadmin.org
Дата:
Сообщение: CVS Commit by dpage: Fix the sorting of index names I broke earlier.
Следующее
От: Hiroshi Saito
Дата:
Сообщение: Re: CVS Build on FreeBSD 4.9