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_8q2c5...@mail.gmail.com -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers