PostgreSQL Clob数据类型 [英] PostgreSQL Clob datatype

查看:2841
本文介绍了PostgreSQL Clob数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PostgreSQL支持 clob text 数据类型来存储大文本。在从Oracle迁移数据库时,我使用了 clob 数据类型。我知道PostgreSQL中的 clob 数据类型最多只能存储1GB的文本,而在oracle中不能存储4GB。

PostgreSQL supports both clob and text data types for storing large texts. I've used clob data type as we are migrating the DB from Oracle. I understand that the clob data type in PostgreSQL can only store up to 1GB of text rather than the 4GB in oracle.

由于我的文字大小远低于1GB,因此我可以使用其中任何一种。那么我可以使用PostgreSQL clob数据类型,还是 text 数据类型比 clob 有什么优势?

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 text datatype over clob?

任何帮助将不胜感激,谢谢您。

Any help will be much appreciated and Thanks in Advance.

推荐答案

clob 数据类型为在Postgres中不受支持。但是,可以轻松地将其定义为文本类型的同义词:

The clob data type is unsupported in Postgres. However, it can be easily defined as a synonym to the text type:

create domain clob as text;

这篇关于PostgreSQL Clob数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆