From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Function for dealing with xlog data |
Date: | 2010-12-28 13:39:20 |
Message-ID: | AANLkTiknRiQ3s1KT124ubvv9OsTu1pvftWn8f335JN+S@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 28, 2010 at 7:49 AM, Magnus Hagander <magnus(at)hagander(dot)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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2010-12-28 13:39:37 | Re: pg_primary_conninfo |
Previous Message | Robert Haas | 2010-12-28 13:38:13 | Re: pg_primary_conninfo |