问题描述
在Postgres中,有一个名为 bytea
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.
我遇到过这个术语 bytea
几次,开始对自己感到奇怪:似乎他们希望我理解这一点……也许我应该找出它是什么。
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.
谢谢。
推荐答案
我认为该文档对于 bytea 和 text :
...这与内容是否为文本有关(取决于您的语言环境和国际化设置)已应用于您的服务器配置和运行它的操作系统)与八位字节(8位二进制值的序列,通常称为字节)的数组。
... 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").
(术语字节和术语八位字节之间存在一些技术区别,因为历史上某些平台和计算设备使用带有奇偶校验和/或停止位的字节而八位位组一词始终精确地表示8位;引入该术语是为了澄清规格和文档r网络协议)。
(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).
这篇关于bytea的数据类型是什么,何时使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!