pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Ed Loehr <eloehr@austin.rr.com>
To: mikeo <mikeo@spectrumtelecorp.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: RE: Re: [SQL] oracle rownum equivalent?
Date: Thu, 8 Jun 2000 13:47:34 +0900
Message-ID: <000e01bfd104$a9ae25a0$2801007e@tpf.co.jp> (raw)
In-Reply-To: <393E6C2A.825BF2B7@austin.rr.com>

> -----Original Message-----
> From: pgsql-general-owner@hub.org [mailto:pgsql-general-owner@hub.org]On
> Behalf Of Ed Loehr
>
> mikeo wrote:
> >
> > thanks for the response.  oid is equivalent to oracle rowid.

IMHO,tid is equivalent to Oracle's rowid.

> > rownum can be used similar to the limit option of select in postgres
> > but in oracle it can also be used in a where clause, or as an assigment
> > in an update statement for instance.
> >
> > eg: update ctmaster set bsc_id = mod(rownum,3) +1;
> >
> > this gives me a way to assign streams to rows in a load balanced manner
> > on the fly, for example.  i use it in other more involved ways than this
> > also.  i cannot do this with limit.  i could do this with sequence with
> > a max value but i'd have to define a sequence each time i wanted to do
> > something "on the fly" or for what ifs.
> >
> > what i'm also interested in is how to find reference to these type of
> > pseudo-columns, even just the names of them, if they're listed
> somewhere.
>
> I think this might be the list, but you might query pgsql-hackers for
> more info.  There was a recent thread involving this..
>
> 	ctid
> 	oid
> 	xmin (minimum transaction number)
> 	xmax
> 	cmin (minimum command number)
> 	cmax
>
> ctid may be what you're looking for, but I don't understand very well how
> these are used.  Maybe someone else can say or you can experiment...
>

AFAIK,there's no pseudo-column like Oracle's rownum which is
dynamically allocated at execution time.

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp




view thread (10+ messages)  latest in thread

Message-ID: <000e01bfd104$a9ae25a0$2801007e@tpf.co.jp>
Permalink:  ../000e01bfd104$a9ae25a0$2801007e@tpf.co.jp/
Also on:    postgresql.org/message-id/000e01bfd104$a9ae25a0$2801007e@tpf.co.jp

 · 

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: Inoue@tpf.co.jp, eloehr@austin.rr.com, mikeo@spectrumtelecorp.com, pgsql-general@postgresql.org
  Subject: Re: [SQL] oracle rownum equivalent?
  In-Reply-To: <000e01bfd104$a9ae25a0$2801007e@tpf.co.jp>
  References: <393E6C2A.825BF2B7@austin.rr.com> <000e01bfd104$a9ae25a0$2801007e@tpf.co.jp>

* 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