PostgreSQL Clob 数据类型
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49963618/
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
PostgreSQL Clob datatype
提问by Tino M Thomas
PostgreSQL supports both cloband textdata types for storing large texts. I've used clobdata type as we are migrating the DB from Oracle. I understand that the clobdata type in PostgreSQL can only store up to 1GB of text rather than the 4GB in oracle.
PostgreSQL 支持clob和两种text数据类型来存储大文本。我在clob从 Oracle 迁移数据库时使用了数据类型。据我所知,clobPostgreSQL中的数据类型最多只能存储 1GB 的文本,而不是 oracle 中的 4GB。
Since my text size is well below 1GB, I am fine with using either of these types. So can I use PostgreSQL clob datatype or is there any advantage for textdatatype over clob?
由于我的文本大小远低于 1GB,因此我可以使用这两种类型中的任何一种。因此,我可以使用PostgreSQL CLOB数据类型或是否有任何优势text数据类型上clob?
Any help will be much appreciated and Thanks in Advance.
任何帮助将不胜感激,并提前致谢。
回答by klin
The clobdata type is unsupportedin Postgres. However, it can be easily defined as a synonym to the texttype:
Postgres不支持该clob数据类型。但是,它可以很容易地定义为类型的同义词:text
create domain clob as text;

