Re: non-integer constant in ORDER BY: why exactly, and documentation? - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: non-integer constant in ORDER BY: why exactly, and documentation?
Date
Msg-id CAL_0b1u+ChOy8sifP5-BdJDSPsC14D1zjEx8Pc=+Vd3ndD6tKQ@mail.gmail.com
Whole thread Raw
In response to Re: non-integer constant in ORDER BY: why exactly, and documentation?  ("A.M." <agentm@themactionfaction.com>)
List 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 by date:

Previous
From: "A.M."
Date:
Subject: Re: non-integer constant in ORDER BY: why exactly, and documentation?
Next
From: Sergey Konoplev
Date:
Subject: Re: Expensive log_line_prefix ?