4 ms·
Using a function to query a fact about a string does not imply that the string should change, regardless of what guarantees are present within the format that t
by pie_flavor 3y ago
Using a function to query a fact about a string does not imply that the string should change, regardless of what guarantees are present within the format that the string is in. If you expect to get out the same string you put in, then there's nothing implementation-quirk about that.
- sgbeal 3y ago> Using a function to query a fact about a string does not imply that the string should change, ... then there's nothing implementation-quirk about that. Fair enough when considering only the string value. My ill-expressed point was more about JSON as a data exchange format - it may pass through any number of JSON parser/storage implementations, any of which may use an arbitrary order for the keys.
- ric2b 3y agoYou're not storing a string, you're storing a JSON object. If you want to store a string use TEXT or VARCHAR.
- pie_flavor 3y agoThat is what this post chain is about. The nuance between choosing to store your JSON as a string in a TEXT column or as JSONB in a BLOB column.