agora inbox for pgsql-general@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Elphick <olly@lfix.co.uk>
Cc: Marcin Wasilewski <marcingrupy@poczta.onet.pl>
Cc: pgsql-general@postgresql.org
Subject: Re: Order in CREATE VIEW
Date: Sat, 14 Apr 2001 04:08:14 -0400
Message-ID: <13487.987235694@sss.pgh.pa.us> (raw)
In-Reply-To: <200104140623.f3E6NqU29861@linda.lfix.co.uk>
References: <200104140623.f3E6NqU29861@linda.lfix.co.uk>

"Oliver Elphick" <olly@lfix.co.uk> writes:
> A view creates a virtual table; there is no implicit ordering in a table,
> so it follows that you should not be able to impose one in a view.

This is indeed the pure-SQL attitude, but it may be worth pointing out
that Postgres 7.1 does allow ORDER BY in subselects and views anyway.

The main reason that that seems like a good idea (IMHO at least) is that
ORDER BY together with LIMIT allow you to select specific rows in ways
that are difficult to accomplish otherwise.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <13487.987235694@sss.pgh.pa.us>
Permalink:  ../13487.987235694@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13487.987235694@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, olly@lfix.co.uk, marcingrupy@poczta.onet.pl
  Subject: Re: Order in CREATE VIEW
  In-Reply-To: <13487.987235694@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox