Skip site navigation (1) Skip section navigation (2)

Re: BUG #1671: Long interval string representation rejected

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark Dilger <markdilger(at)yahoo(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1671: Long interval string representation rejected
Date: 2005-05-19 03:41:05
Message-ID: 428C0AD1.8080802@samurai.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom Lane wrote:
> Well, if you allow for whitespace between tokens then it's immediately
> clear that there is no fixed upper bound.

Good point -- there is no upper bound on the input string, but since we 
skip whitespace, AFAICS this shouldn't affect the requirements for the 
size of the working buffer (lowstr). So if we passed the size of the 
working buffer to ParseDateTime() (per earlier gripe), we could only 
bail out when we actually need to use more working space than was 
allocated, not simply when strlen(input) >= sizeof(buffer). The 
implementation might be a bit ugly, though.

> Perhaps it would work to downcase just one token at a time, so that
> the max buffer length equals the max acceptable token?

Not sure I follow you.

-Neil

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-05-19 04:08:05
Subject: Re: BUG #1671: Long interval string representation rejected
Previous:From: Tom LaneDate: 2005-05-19 03:24:29
Subject: Re: BUG #1671: Long interval string representation rejected

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group