In Postgres there is a datatype called bytea
The Postgres docs are here for it: http://www.postgresql.org/docs/9.0/static/datatype-binary.html
I cannot understand when I would ever use this - nor can I really understand the purpose of this datatype.
I have come across this term bytea
several times and starting to wonder to myself "It seems like they expect me to understand this... Maybe I should find out what it is."
If anybody can give a simple definition for it and some given circumstance of when I would possibly use it, that would be super helpful.
Thanks.
I think the documentation is reasonably clear on the differences between bytea and text:
http://www.postgresql.org/docs/9.0/static/datatype-binary.html
... it has to do with whether the contents are "text" (subject to the locale and internationalizations settings you've applied to your server configuration and the OS on which you're running it) vs. arrays of "octets" (sequences of 8-bit binary values --- commonly referred to as "bytes").
(There are some technical distinctions between the term "byte" and the term "octet" -- because, historically, some platforms and computing devices used "bytes" with parity and/or stop bits while the term "octets" always means exactly 8-bits; a term that was introduced to clarify specifications and documentation for networking protocols).
VARBINARY, which is an equivalent to BYTEA in PG, can be used to store OAuth access tokens.