Re: How should I do this?

From: Laurent Duperval <laurent(dot)duperval(at)masq(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How should I do this?
Date: 2002-06-28 12:22:07
Message-ID: afhkda$1sjg$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In <20020628121755(dot)A15733(at)svana(dot)org>, Martijn van Oosterhout wrote:
> Ah right. The problem is that DISTINCT ON requires that the fields be
> distincted on be the same and the first few fields being sorted by. In the
> hypothetical case you could do:
>
> select distinct on (col2) select * from a order by col1;
>
> But that isn't allowed. Maybe you will be a stored procedure or something.

I ended up doing this on the client side because there isn't a way for the
DB to know what I'm trying to do. I also wrote the cleanup stuff on the
client side and everything is working up to specs.

Thanks!

L

--
Laurent Duperval <mailto:laurent(dot)duperval(at)masq(dot)ca>

Why are there flotation devices under plane seats instead of parachutes?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2002-06-28 12:33:00 Re: Shared Memory Sizing
Previous Message P.J. "Josh" Rovero 2002-06-28 11:40:46 Re: One source of constant annoyance identified