Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (5k points)

There is a data type available in Postgre called as bytea

I have read it from official docs:

 http://www.postgresql.org/docs/9.0/static/datatype-binary.html

When can I use this and what is it actually?

1 Answer

0 votes
by (10.2k points)

Documentation has already cleared the difference between bytea and text:

There are two ways to distinguish binary strings and character strings. Binary strings help us to store octets of value zero and other non printable octets. Character strings do not allow zero octets and also disallow any other octet sequences of octet values that are invalid  on the basis of the database's selected character set encoding. Second, operations on binary strings process the actual bytes, but the processing of character strings depends totally on locale settings. Therefore, binary strings are appropriate for storing data of raw bytes type.

If you want to get more insights into SQL, check out this SQL Course from Intellipaat.

Related questions

Browse Categories

...