select distinct and order by

From: newsreader(at)mediaone(dot)net
To: pgsql-general(at)postgresql(dot)org
Subject: select distinct and order by
Date: 2001-08-16 05:18:57
Message-ID: 20010816011856.A20451@dragon.universe
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pg complained that select distinct column and
order by column must be the same.

Is there any way to get around that?

If not I have some questions re DBI

Say I am using perl DBI to retrieve
like
------------
$s=$dbd->prepare('select ...');
$s->execute(...);

while(my @a=$s->fetctrow_array())
{
.
.
.
}
---------------

And let's say select statement return 10,000
records and I exit the loop after reading
1000 records. Let's also say that
the client and server are on different
boxes. Is 10,000 records transferred
over the network even if I quit after
reading 1000 records?

Thanks in advance

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-08-16 05:56:33 Re: select distinct and order by
Previous Message Sodom 2001-08-16 05:11:43 connect to postgresql by TCP problem