Re: Reverse-sort indexes and NULLS FIRST/LAST sorting
От | Tom Lane |
---|---|
Тема | Re: Reverse-sort indexes and NULLS FIRST/LAST sorting |
Дата | |
Msg-id | 4186.1168029281@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Reverse-sort indexes and NULLS FIRST/LAST sorting (Michael Glaesemann <grzm@seespotcode.net>) |
Список | pgsql-hackers |
Michael Glaesemann <grzm@seespotcode.net> writes: > On Jan 4, 2007, at 13:33 , Tom Lane wrote: >> index-column-id [ opclass-name ] [ DESC ] [ NULLS {FIRST|LAST} ] >> >> DESC must be a fully reserved word else it can't be distinguished from >> an opclass name. But guess what, it already is. > A point in favor of using DESC over REVERSE as you had earlier > proposed is that DESC is already a reserved word, while REVERSE isnt' > even in the list of key words. Right, that's what convinced me not to use REVERSE. Also, the parallelism of this construct to what is allowed in ORDER BY seems a bit pleasing. > As DESC is quite closely associated > with its antonym ASC wrt ordering, any thoughts of allowing ASC as an > optional noise word? Users may be surprised if ASC were to throw an > error. Yup, I'd come to the same plan. Actually ASC will not be a complete noise word: if you specify it (or a NULLS clause) on an index type that doesn't have a sort order, you'll get an error. regards, tom lane
В списке pgsql-hackers по дате отправления: