Skip site navigation (1) Skip section navigation (2)

Re: Useless sort by

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: gnuoytr(at)rcn(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Useless sort by
Date: 2010-09-23 04:18:27
Message-ID: AANLkTimoYT-0WJR_YMymU9rrQ39eGZsMqombQ00FDnRe@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Wed, Sep 22, 2010 at 10:01 PM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> gnuoytr(at)rcn(dot)com wrote:
>>
>> Spoken like a dyed in the wool COBOL coder.  The RM has no need for order;
>> it's set based.  I've dabbled in PG for some time, and my sense is
>> increasingly that PG developers are truly code oriented, not database (set)
>> oriented.
>
> I can't tell if you meant for this to be insulting or my reading it that way
> is wrong, but it certainly wasn't put in a helpful tone.  Let me summarize
> for you.  You've been told that putting ORDER BY into a view is a generally
> poor idea anyway, that it's better to find ways avoid this class of concern
> altogether.

It's been a few years since I've read the SQL spec, but doesn't it
actually forbid order by in views but pgsql allows it anyway?

Like you said, order by in a view is a bad practice to get into, and
it's definitely not what a "set oriented" person would do.  it's what
a code oriented person would do.

In response to

pgsql-performance by date

Next:From: Robert HaasDate: 2010-09-23 04:46:16
Subject: Re: Useless sort by
Previous:From: Greg SmithDate: 2010-09-23 04:01:08
Subject: Re: Useless sort by

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group