Occasionally I get zedtokens longer than
# spicedb
h
Occasionally I get zedtokens longer than 50 characters. It’s actually 80 characters long. What’s the max length they can get? Am I save to assume it gets never longer than 100 characters?
e
It depends on the datastore, and right now at least we haven't made any restrictions on possible length. Spanner and Cockroach are both basically timestamps right now, but postgres revisions return a list of in-flight txids that are used to resolve order on subsequent calls. In theory that list could be arbitrarily long. We've also talked at various points about encoding more information into a zedtoken which would also increase length
h
We are using Postgres. Is the recommendation then to use unlimited varchar?
I dont like unlimited length. How do you feel about 256?
y
ah, like for a column that would store zedtokens in an application database table?
j
1024
is the recommendation
we reserve the right to make the zedtokens larger in the future to store extra information
in fact, there is a PR out right now that does increase them a bit
I doubt they will go over
236
anytime soon, but
1024
is the recommendation just in case
4 Views