pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql@postgresql.org
Subject: Re: sort / limit / range problem
Date: Wed, 5 Mar 2003 15:47:24 +0800
Message-ID: <20030305154724.M33531@klaster.net> (raw)
In-Reply-To: <200303051437.47161.gary.stainburn@ringways.co.uk>
References: <200303051437.47161.gary.stainburn@ringways.co.uk>

> Hi folks,
> 
> I've got a glossary table that I'm trying to render to HTML. 
>  However, I've got a problem when using order by and limit.  Below 
> is an example of  a psql session showing my problem. Anyone got any 
> reasons why the last select misses  'Driver'?
> 

Everything is ok. Without order by, limit has undeterminated result. It is 
described in Postgresql documentation.

Try this:

select glterm from glossary where glterm > 'Driving Wheels' 
order by glterm limit 1

select glterm from glossary where glterm > 'Draw Bar'
order by glterm limit 1

Regards,
Tomasz Myrta




view thread (4+ messages)  latest in thread

Message-ID: <20030305154724.M33531@klaster.net>
Permalink:  ../20030305154724.M33531@klaster.net/
Also on:    postgresql.org/message-id/20030305154724.M33531@klaster.net

 · 

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-sql@postgresql.org
  Cc: jasiek@klaster.net, gary.stainburn@ringways.co.uk
  Subject: Re: sort / limit / range problem
  In-Reply-To: <20030305154724.M33531@klaster.net>

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

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