erlang-psql-driver bug with ORDER BY

2 views
Skip to first unread message

ngocdaothanh

unread,
May 8, 2009, 1:32:29 AM5/8/09
to erlyweb
1. Bug
When using erlang-psql-driver directly with ORDER BY, the rows are
reversed. The reason is that in psql_logic.erl, function fetch_result
(From, Result, State), new row is added to the result by [Data |
Result], but finally the result is not reversed by lists:reverse.

2. ErlyDB

When using ErlyDB with PostgreSQL with ORDER BY, the rows are in
correct order, because there are places in erlydb_psql.erl the result
is reversed. For example lists:revese(Fields) at get_metadata.

3. Fix propersal

I propose that both erlang-psql-driver (psql_logic.erl) and
erlydb_psql.erl (ErlyDB) are fixed.
Reply all
Reply to author
Forward
0 new messages