Re: Function for dealing with xlog data

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Function for dealing with xlog data
Дата
Msg-id AANLkTikdD777=ThrnhUZXzfTy-aBNNFDWUEpe_1aUZD=@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function for dealing with xlog data  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Function for dealing with xlog data  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Tue, Dec 28, 2010 at 14:39, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Dec 28, 2010 at 7:49 AM, Magnus Hagander <magnus@hagander.net> wrote:
>> Currently, a number of functions return data in a really
>> calculation-unfriendly format, e.g:
>>
>> postgres=# select * from pg_current_xlog_location();
>>  pg_current_xlog_location
>> --------------------------
>>  0/3013158
>> (1 row)
>>
>> It would be very useful to have a way to convert this to a bigint - so
>> we can do differences between different values easily. And it's AFAIUI
>> easily converted to a 64-bit integer.
>>
>> Would others find this useful as well?
>
> Yes.
>
>> What's the best way of doing it? Should we have a function that takes
>> text as input, or should the functions in question be made to return a
>> new datatype that could then be casted?
>
> The new datatype seems more elegant, but a conversion function would
> be a lot less work.

Well, yeah, that was obvious ;) The question is, how much do we prefer
the more elegant method? ;)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


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

Предыдущее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: estimating # of distinct values
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Function for dealing with xlog data