Re: "Oracle's ROWNUM" - Mailing list pgsql-general

From Svenne Krap
Subject Re: "Oracle's ROWNUM"
Date
Msg-id d049mtcvdem015d3i7un9pl6nusg4ip7hd@4ax.com
Whole thread Raw
In response to Re: "Oracle's ROWNUM"  (Ryan Mahoney <ryan@paymentalliance.net>)
Responses Re: Re: "Oracle's ROWNUM"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sat, 28 Jul 2001 22:05:55 +0000 (UTC), ryan@paymentalliance.net
(Ryan Mahoney) wrote:


>I think you should look into the documentation for your particular
>interface.  We generally use PHP as an interface.  We use the pg_exec
>function to create an indexed result set from a connection and
>statement.  Then we iterate through each indexed row, calling
>pg_fetch_array so we can manipulate and display returned values.
>
>Hope this answers your question!


Well not exactly.

I thought of the possibility to do something like

select rownum as artistplacement, s.* from (select rownum as
techplacement, * from ranking order by technical_points) order by
s.artiste_points

In that way you could pull out two rankings at once. Infact, I really
like the rownum for at lot of things, eventhough I am fully aware of
the possibilities to do without (I have worked PHP for more than two
years now, professionally - state of the art solutions including a lot
of database connectivity, shared memory, semaphores, tcp/ip
connections and so on (and quite often manipulating litteraly
thousands of tuples inside PHP) on top notch machinery.

So I wasn't really one of those newbie "how do I order the results
after the primary key", it was a question asking for a very specific
feature enableling me to do a lot of interesting stuff directly in the
database-backend otherwise quite hard to accomplish (or maybe just
with far too much work).

Regards

Svenne
--
Mail usenet@krap.dk - svenne@krap.dk - PGP key id : 0xDF484022
ICQ: 5434480 - http://www.krap.dk - http://www.krap.net
PGP Key http://keys.pgp.dk:11371/pks/lookup?op=get&search=0xDF484022

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: HELP! BUG? pg_dump mucks up grant/revoke
Next
From: Tom Lane
Date:
Subject: Re: Re: "Oracle's ROWNUM"