Computer Science, asked by rish2364, 10 months ago

State difference between varchar and text data type of postgresQL.

Answers

Answered by riya1604
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