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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Problem with result ordering


  • From: Thorsten Körner <t(dot)koerner(at)cappuccinosoft(dot)de>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: Problem with result ordering
  • Date: Thu, 25 Jan 2007 16:45:23 +0100
  • Message-id: <200701251645(dot)23368(dot)t(dot)koerner(at)cappuccinosoft(dot)de>

Hi,

when I fire the following query:
select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, 
11042, 16279, 42197, 672089);

I will get the same results in the same order, as in in the next query:
select m_id, m_u_id, m_title, m_rating from tablename where m_id in 
(11042,42197,672089,26250,16279);

I wonder, how it is possible, to retrieve the results in the same order, as 
queried in the list. The listed IDs are from an application outside the 
database.

Version is PostgreSQL 8.2.1

Has anyone an idea, how to do this, while PostgreSQL knows nothing about 
hints, like oracle does?

THX,
Thorsten



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group