Sorting issue in table grid

Поиск
Список
Период
Сортировка
От Erwin Brandstetter
Тема Sorting issue in table grid
Дата
Msg-id 47167847.9040203@falter.at
обсуждение исходный текст
Ответы Re: Sorting issue in table grid  (Dave Page <dpage@postgresql.org>)
Список pgadmin-hackers
Hi developers! Hi Dave!

Testing the pgAdmin III 1.8.0  RC1 (Oct 9 2007, rev: 6725). Client Win
XP. Host: Debian Etch / PG 8.2.4


The phenomenon:
When applying a filter in the table grid, sorting stops to work sometimes.
I have seen this before, but could not reproduce it. This time I logged
the SQL statements and found the cause.


Explanation:
I work with varying filters to edit data in big tables. For this purpose
I sometimes comment out parts of the filter to reuse them later. Herein
lies the catch: pgadmin appends the "ORDER BY" clause without a newline,
so it gets commented out, if the filter ends with a comment.


Steps to reproduce:
Open edit grid on table foo, sort it by foo_id, and apply a filter:
    foo_id > 5000
    -- and foo <> 'sometxt'
The second (and last) line is commented out, for later use. pgAdmin
sends this query to the server:

SELECT * FROM foo WHERE foo_id > 5000
-- and foo <> 'sometxt' ORDER BY foo_id ASC


Fix:
Make sure there is a newline before appending the ORDER BY clause.


Regards
Erwin

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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Release schedule
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: translator: Russian