8.1. Advanced Data Types

So far you have dealt with the basic set of PostgreSQL's data types such as int4, numeric, and text. These basic data types are provided by almost all common databases. In PostgreSQL an impressive list of additional data types is provided. These data types can be used to store specific pieces of information more efficiently than could be done using commonly known data types.

In addition to a broad range of data types, PostgreSQL provides an easy C interface for defining your own data types. Only a few functions need to be implemented in order to create new data types. When working with your own data types, you need not worry about accessing your data using PHP because data is always returned as text, so new data types ...

Get PHP and PostgreSQL: Advanced Web Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.