ORDER BY <field not in return list>

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ORDER BY <field not in return list>
Date: 2005-07-25 21:11:08
Message-ID: 20050725180745.P54567@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Just curious as to whether or not a warning or something should be issued
in a case like:

SELECT c.*
FROM company c, company_summary cs
WHERE c.id = cs.id
AND cs.detail = 'test'
ORDER BY cs.fullname;

Unless I'm missing something, the ORDER BY clause has no effect, but an
EXPLAIN shows it does take extra time, obviously ...

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-07-25 21:35:16 Re: More buildfarm stuff
Previous Message Jim C. Nasby 2005-07-25 20:59:50 Re: [HACKERS] Enticing interns to PostgreSQL