From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "Ed Loehr" <eloehr(at)austin(dot)rr(dot)com>, "mikeo" <mikeo(at)spectrumtelecorp(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | RE: Re: [SQL] oracle rownum equivalent? |
Date: | 2000-06-08 04:47:34 |
Message-ID: | 000e01bfd104$a9ae25a0$2801007e@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
> -----Original Message-----
> From: pgsql-general-owner(at)hub(dot)org [mailto:pgsql-general-owner(at)hub(dot)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(at)tpf(dot)co(dot)jp
From | Date | Subject | |
---|---|---|---|
Next Message | John Daniels | 2000-06-08 06:28:20 | Re: FreeBSD PostgreSQL7 port and v7.0.2 |
Previous Message | Tom Dryden | 2000-06-08 02:56:10 | Re: Postgresql |
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2000-06-08 10:50:20 | Re: |
Previous Message | Joseph Shraibman | 2000-06-08 03:09:54 | Re: counting distinct values |