Re: "Oracle's ROWNUM"

From: Svenne Krap <usenet(at)krap(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: "Oracle's ROWNUM"
Date: 2001-07-29 22:47:35
Message-ID: d049mtcvdem015d3i7un9pl6nusg4ip7hd@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 28 Jul 2001 22:05:55 +0000 (UTC), ryan(at)paymentalliance(dot)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(at)krap(dot)dk - svenne(at)krap(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-07-29 23:55:44 Re: Re: "Oracle's ROWNUM"
Previous Message Tom Lane 2001-07-29 22:15:04 Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke