Google has marked the reference
and id
fields as deprecated as of June 24th 2014, and replaced it with a single place_id
.
I've so far only seen place_id
lengths of exactly 27 characters, but wonder if there is any documentation for this length? I have been unable to find this documented anywhere.
Obviously knowing the length of the place_id
is significant for choosing an optimal database field, and therefore something I'd like to know.
From the Google Places API docs site:
The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a unique identifier that can be used to compare places and to retrieve information about a place. The Places API currently returns a place_id in all responses, and accepts a placeid in the Place Details and Place Delete requests. Soon after June 24, 2015, the API will stop returning the id and reference fields in responses. Some time later, the API will no longer accept the reference in requests. We recommend that you update your code to use the new place ID instead of id and reference as soon as possible.
I'd use
varbinary(1024)
Knowing possible max. length is even more important for input validation than (often prematurely) worrying about the column storage overhead. Most databases share a similar space overhead once you exceed 255.