pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Beer <Robert.Beer@Callserve.com>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: Newbie ex-Oracle person's question: Oracle ROWID = PSQL OID, Orac le ROWNUM = PSQL ???
Date: Tue, 8 May 2001 16:01:33 -0000
Message-ID: <AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com> (raw)

Oracle has a ROWNUM pseudo column that works like this ...
TEST>select callid, rownum from cs_calls where rownum < 5;

    CALLID     ROWNUM
---------- ----------
      7806          1
      7807          2
      7809          3
      6443          4

4 rows selected.

... which can be quite handy.

Is there something like this in PSQL?

By the way, having used Oracle since 1987 it's a pleasure to use PSQL.
Someone actually thinks about the implemented features.
For example, Oracle's implementation of ROWNUM gives them in the order the
rows were BEFORE the ORDER BY, which is not of much use as adding an ORDER
BY jumbles them up.  Duh!

Thanks in advance for any responses.



view thread (3+ messages)  latest in thread

Message-ID: <AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com>
Permalink:  ../AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com/
Also on:    postgresql.org/message-id/AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: Robert.Beer@Callserve.com
  Subject: Re: Newbie ex-Oracle person's question: Oracle ROWID = PSQL OID, Orac le ROWNUM = PSQL ???
  In-Reply-To: <AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com>
  References: <AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com>

* 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