Re: xlog location arithmetic - Mailing list pgsql-hackers

From Euler Taveira de Oliveira
Subject Re: xlog location arithmetic
Date
Msg-id 4F49746F.2000706@timbira.com
Whole thread Raw
In response to Re: xlog location arithmetic  (Magnus Hagander <magnus@hagander.net>)
Responses Re: xlog location arithmetic  (Fujii Masao <masao.fujii@gmail.com>)
Re: xlog location arithmetic  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On 25-02-2012 09:23, Magnus Hagander wrote:
> Do we even *need* the validate_xlog_location() function? If we just
> remove those calls, won't we still catch all the incorrectly formatted
> ones in the errors of the sscanf() calls? Or am I too deep into
> weekend-mode and missing something obvious?
> 
sscanf() is too fragile for input sanity check. Try
pg_xlog_location_diff('12/3', '-10/0'), for example. I won't object removing
that function if you protect xlog location input from silly users.


--   Euler Taveira de Oliveira - Timbira       http://www.timbira.com.br/  PostgreSQL: Consultoria, Desenvolvimento,
Suporte24x7 e Treinamento
 


pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Memory usage during sorting
Next
From: Thom Brown
Date:
Subject: Re: Command Triggers, patch v11