PostgreSQL: Up and Running, by Regina Obe and Leo Hsu, is a somewhat interesting book that helps you get introduced to the PostgreSQL world - except if you did read the official documentation. I felt kinda disappointed with this book, but I guess it may be because I have already read most of the official docs. It’s probably a good resource for absolute beginners because it’s short and the contents are very distilled, but it’s pretty useless for people that already know the basics.
Book on Amazon: PostgreSQL: Up and Running
My personal notes
Data types
- Serial: autoincrementing integer. When creating a column with type serial, a sequence object is created in the background.
- Arrays: they are useful in building aggregate functions, forming IN and ANY clauses and holding intermediary values for morphing to other data types.
- Character types: character (char), character varying (varchar) and text.
- Temporal data types:
- date: stores month, day and year without timezone.
- time: stores hours, minutes and seconds without timezone.
- timestamp: stores timestamp without timezone.
- timestampz: stores timestamp with timezone data.
- interval: period of time in hours, days, months, minutes and others. Useful when doing date-time arithmetic.
- Custom data types: custom data types can be defined and used like any standard type.