Re: delete other similar entries with timestamp <= times

Поиск
Список
Период
Сортировка
От 'knut.suebert@web.de'
Тема Re: delete other similar entries with timestamp <= times
Дата
Msg-id 20020802175950.GA22007@web.de
обсуждение исходный текст
Ответ на Re: delete other similar entries with timestamp <= times  ("Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>)
Список pgsql-novice
Henshall, Stuart - WCP schrieb:
>    Hello,
>            How about something like:
>    DELETE FROM tbl WHERE EXISTS
>            (SELECT * FROM tbl AS tbl_b WHERE tbl_b.nr=tbl.nr
>                    AND tbl_b.stamp<tbl.stamp AND
>                    tbl_b.stamp>=tbl.stamp-CAST('15 minute' AS interval));
>    This may have a problem with the following however:
>            nr | stamp
>            ---+------
>             1 | 20:45
>             1 | 20:55
>             1 | 21:05
>    I am unsure wether this will leave just the 20:45 case or be indeterminate
>    (with the alternate leaving the 20:45 and 21:05 entry)

That does not care a very lot in my case - but thanks a lot,
Knut Sübert

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

Предыдущее
От: "James Kelty"
Дата:
Сообщение: Re: Replication
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Aggregates and Indexes