Re: Formulating an sql query with CTID

Поиск
Список
Период
Сортировка
От Tzahi Fadida
Тема Re: Formulating an sql query with CTID
Дата
Msg-id 200607291337.45131.Tzahi.ML@gmail.com
обсуждение исходный текст
Ответ на Formulating an sql query with CTID  (Tzahi Fadida <Tzahi.ML@gmail.com>)
Ответы Re: Formulating an sql query with CTID  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
10x,
Found my answer thanks to Ragnar.
SELECT DISTINCT ON (a0,a1) a0,a1,ctid FROM t1

To tell the truth, i did not know there was an ON option in SQL.
This thing is very handy.

On Saturday 29 July 2006 03:37, Tzahi Fadida wrote:
> Hi,
> I have a query i am having trouble to formulate:
> I used to do:
> SELECT DISTINCT a0,a1 FROM public.t1
> However, now i need to add the CTID attribute, but CTID is unique
> thus, distinct is useless. In addition, i can't seem to be able to use
> max() etc... or casting to anything on CTID in order to use group by
> technique.
>
> What are my options?
>
> (I am using 8.2 or 8.1)

--
Regards,
        Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at
http://members.lycos.co.uk/my2nis/spamwarning.html


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Luke Lonergan"
Дата:
Сообщение: Re: On-disk bitmap index patch
Следующее
От: "korryd@enterprisedb.com"
Дата:
Сообщение: Re: Possible explanation for Win32 stats regression test