Re: non-integer constant in ORDER BY: why exactly, and documentation?

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: non-integer constant in ORDER BY: why exactly, and documentation?
Дата
Msg-id CAL_0b1u+ChOy8sifP5-BdJDSPsC14D1zjEx8Pc=+Vd3ndD6tKQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: non-integer constant in ORDER BY: why exactly, and documentation?  ("A.M." <agentm@themactionfaction.com>)
Список pgsql-general
On Thu, Oct 11, 2012 at 2:07 PM, A.M. <agentm@themactionfaction.com> wrote:
> On Oct 11, 2012, at 4:48 PM, Ken Tanzer wrote:
> select * from generate_series(1,10) order by coalesce('foo');

Another workaround is

select bar.* from generate_series(1,3) as bar, (values ('foo')) as foo
order by foo;

or even simpler

select * from generate_series(1,3) order by (values ('foo'));

or my favorite

select * from generate_series(1,3) order by 'foo'::text;

--
Sergey Konoplev

a database and software architect
http://www.linkedin.com/in/grayhemp

Jabber: gray.ru@gmail.com Skype: gray-hemp Phone: +14158679984


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

Предыдущее
От: "A.M."
Дата:
Сообщение: Re: non-integer constant in ORDER BY: why exactly, and documentation?
Следующее
От: Sergey Konoplev
Дата:
Сообщение: Re: Expensive log_line_prefix ?