Re: select unique items in db

From: "a" <a(at)tempinbox(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select unique items in db
Date: 2006-09-14 04:47:22
Message-ID: 1158209242.628064.303100@m73g2000cwd.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

this doesnt work

SELECT DISTINCT on link *, rank(ts_vec, to_tsquery('default', $qtxt))
FROM feed_entry WHE RE ts_vec @@ to_tsquery('default', $qtxt) ORDER
BY rank(ts_vec, to_tsquery('default', $qtxt)) DESC LIMIT 5 OFFSET 0

can you tell me how to get the DISTINCT elements in LINK
thanks

Stijn Vanroye wrote:
> a schreef:
> > "select unique id" - i found this line in google search
> > but i want to make
> > select * as unique
> >
> > select unique * is
> > or select distinct
> >
> > pls point out how to select unique items from a list of million items
> >
> Maybe
> select distinct <fieldlist> from ...
> or
> select distinct on (field1,field2) <fieldlist> from ... ?
>
> Regards,
>
> Stijn.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-09-14 06:14:44 Re: remote duplicate rows
Previous Message Ron Johnson 2006-09-14 02:52:29 Re: remote duplicate rows