29

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.

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.

naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
Tino M Thomas
  • 1,676
  • 2
  • 16
  • 24

1 Answers1

52

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;
klin
  • 112,967
  • 15
  • 204
  • 232