Re: pg_lsn cast to/from int8

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: pg_lsn cast to/from int8
Дата
Msg-id CABUevEw6b7z+CHrywOF_3gXJU7kAYxCqZNbqETZnSJQFATVi_g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_lsn cast to/from int8  (Andres Freund <andres@anarazel.de>)
Ответы Re: pg_lsn cast to/from int8  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers


On Tue, Jan 26, 2016 at 3:00 PM, Andres Freund <andres@anarazel.de> wrote:
On 2016-01-26 14:56:21 +0100, Magnus Hagander wrote:
> Is there a reason we don't have casts between int8 and pg_lsn? AFAICT it
> works fine if I create the cast manually... Is it because of
> signed/unsigned if people have really really many transactions?

What for do you want that cast? Yes, the internally mostly share the
representation, but other than that, I don't really see why it's
interesting?

In this case, mostly legacy compatibility. Making an app that works with versions that don't have pg_lsn have a nice path forward to the modern world. Being able to cast from pg_lsn to int8 can also make it easier to work with the values in the client application, though I don't need that for this particular one.

--

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pg_lsn cast to/from int8
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Improve tab completion for REFRESH MATERIALIZED VIEW