Newbie ex-Oracle person's question: Oracle ROWID = PSQL OID, Orac le ROWNUM = PSQL ???

From: Robert Beer <Robert(dot)Beer(at)Callserve(dot)com>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Newbie ex-Oracle person's question: Oracle ROWID = PSQL OID, Orac le ROWNUM = PSQL ???
Date: 2001-05-08 16:01:33
Message-ID: AAF7CC40BD87F347A2A8BD72F9D5514361EE3B@csoff2exc01.callserve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Roger Wernersson 2001-05-08 18:31:13 Re: SQL Server -> Postgres migration: Stored Procedure replacement?
Previous Message Sergey E. Volkov 2001-05-08 14:35:05 Re: Informix->PostgreSQL database convertion