“ORDER BY … USING” clause in PostgreSQL
问题 The ORDER BY clause is decribed in the PostgreSQLdocumentation as: ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] Can someone give me some examples how to use the USING operator ? Is it possible to get an alternating order of the resultset? 回答1: A very simple example would be: > SELECT * FROM tab ORDER BY col USING < But this is boring, because this is nothing you can't get with the traditional ORDER BY col ASC . Also the standard catalog doesn't