Re: should we add a XLogRecPtr/LSN SQL type?

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: should we add a XLogRecPtr/LSN SQL type?
Date: 2013-12-11 13:13:51
Message-ID: 52A8650F.7040302@timbira.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11-12-2013 09:41, Andres Freund wrote:
> There's already a couple of SQL function dealing with XLogRecPtrs and
> the logical replication work will add a couple of more. Currently each
> of those funtions taking/returning an LSN does sprintf/scanf to
> print/parse the strings. Which both is awkward and potentially
> noticeable performancewise.
>
While discussing pg_xlog_location_diff function, Robert posted a lsn
datatype [1]. At that time we wouldn't go that far (a new datatype) to
cover only one function. If your proposal is just validation, I think
generic validation functions is the way to follow. However, if you are
thinking in adding operators, the lsn datatype should be implemented.

> It seems relatively simple to add a proper type, with implicit casts
> from text, instead?
>
Do you want to change the function signatures too?

[1]
http://www.postgresql.org/message-id/CA+TgmoZRMNN0eVEsD-kxB9e-MvdmwoTi6guuJUvQP_8q2C5Cyg@mail.gmail.com

--
Euler Taveira Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-12-11 13:26:59 Re: -d option for pg_isready is broken
Previous Message Robert Haas 2013-12-11 13:13:18 Re: should we add a XLogRecPtr/LSN SQL type?