Search Postgresql Archives

Re: select issue with order v8.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 24, 2010 at 8:50 PM, Terry <td3201@xxxxxxxxx> wrote:
> Hello,
>
> I have an application that is doing something stupid in that it is
> tacking on its own order clause at the end of the statement I am
> providing.
>
> For example, I am putting this statement in:
> select ev_id,type,ev_time,category,error,ev_text,userid,ex_long,client_ex_long,ex_text
> from clients_event_log limit 100
>
> It is tacking on ORDER BY ev_id.  The problem is that isn't per the
> syntax.  Can anyone think of anything clever to get around this stupid
> application doing what it is doing?  For example, anything I can do
> beside limit?
>
> I appreciate the thoughts!

You could either wrap it in a subselect or make a view.

select * from (select
ev_id,type,ev_time,category,error,ev_text,userid,ex_long,client_ex_long,ex_text
from clients_event_log limit 100) as a

and an order by tacked on the end of that is ok.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux