什么是 postgresql 中 varbinary(10) 的等价物

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19551065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 01:09:44  来源:igfitidea点击:

what is the equivalent of varbinary(10) in postgresql

postgresqlsqldatatypesbit-fields

提问by liv a

I'm trying to define a bitfield of 10 bytes. In SQL Server I'd use varbinary(10). I know that byteareplaces varbinary (MAX)for images, but didn't find any documentation on limiting the number of bits in it.

我正在尝试定义一个bit10 字节的字段。在 SQL Server 中,我会使用varbinary(10). 我知道bytea替换varbinary (MAX)图像,但没有找到任何关于限制位数的文档。

Is there a way to do that?

有没有办法做到这一点?