Book Image

Learning Heroku Postgres

By : Patrick Rafael de Oliveira Espake
Book Image

Learning Heroku Postgres

By: Patrick Rafael de Oliveira Espake

Overview of this book

Table of Contents (17 chapters)
Learning Heroku Postgres
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Keyword List
Index

Data types


In computer science, data type is a combination of values and operations that one variable can perform. There are a large number of data types available such as integer, float, Boolean, Array, Hash, and many others. PostgreSQL is no different; you have a collection of data types available by default, such as numeric, monetary, character, binary, date/time, Boolean, enumerated, and many others.

In some cases, other kinds of data types are necessary and they aren't installed by default on PostgreSQL. In this section, you will discover the power of some important extensions for data types.

Case-insensitive text – citext

This data type is very useful for working with queries where the data is case insensitive. You can use this feature with an implementation to facilitate your searches, such as searching for products on an e-commerce website.

For you to understand, the data type text is generally used, but it is case sensitive. For example, suppose you have a table with the column username...