[OSM-dev] 0.5 API: /api/0.5/user/preferences, values truncated to 256 chars
Andy Allan
gravitystorm at gmail.com
Tue Nov 25 15:56:30 GMT 2008
On Tue, Nov 25, 2008 at 3:37 PM, Chris Browet <cbro at semperpax.com> wrote:
>> You can look at the code just as easily as we can...
>>
> Yep. Actually, the db fields are VARCHAR(255) so that's the "problem". I'll
> change the wiki page for 0.5.
>
> Is something different foreseen for 0.6, whether suppressing the 150 entries
> limitation or the 255 char limitation?
It's not come up until now, as far as I'm aware. Given that all the
other k/v pairs are limited to 256 chars, it's probably best to keep
it the same for user preferences. I know I'm not the only one who
looks at the number of *_tags tables and wonders if there's a better
way of doing it...
As for the 150 entries, that only seems to apply to the update method,
as far as my reading of the code goes. YMMV, but it seems fine to make
151 calls to the update_one method instead. It's probably best to
avoid bulk updating more than 150 entries but I'm not certain what
Steve was planning when he wrote it originally.
Cheers,
Andy
More information about the dev
mailing list