State difference between varchar and text data type of postgresQL.
Answers
Answered by
0
TEXT
fixed max size of 65535 characters (you cannot limit the max size)
takes 2 + c bytes of disk space, where c is the length of the stored string.
cannot be part of an index
VARCHAR(M)
variable max size of M characters
M needs to be between 1 and 65535
takes 1 + c bytes (for M ≤ 255) or 2 + c(for 256 ≤ M ≤ 65535) bytes of disk space where c is the length of the stored string
can be part of an index
.
.
.
hope this helps you
riya1604
Similar questions
Math,
6 months ago
Science,
6 months ago
Computer Science,
1 year ago
Chemistry,
1 year ago
India Languages,
1 year ago
Math,
1 year ago