Loading topic
SELECT, INSERT and CREATE TABLE statements and run them in psql or another client. It covers PostgreSQL's three integer types, how overflow behaves, and how identity columns generate keys. Exact decimals are the next chapter, so fractional values are 6 min readSELECT, INSERT and CREATE TABLE statements, can run queries in psql or another PostgreSQL client, and know what a column and a constraint are. You should also know the integer types from the previous chapter. Here you will learn how numeric stores dec5 min readreal and double precision. This chapter explains how they store values, why the results can look wrong, and when they are still the right choice. It assumes you know basic SQL (SELECT, CREATE TABLE), can run queries in psql, and have read the previo5 min readSELECT, INSERT, CREATE TABLE), run queries in psql or another client, and know what a column and a constraint are. It covers the three character types in PostgreSQL, how they differ, and the mistakes people commonly make with them.5 min readSELECT, INSERT and CREATE TABLE statements and run queries in psql. It covers the boolean type, why a boolean column can hold three states, and the errors that follow from that.4 min readSELECT, INSERT and CREATE TABLE statements. It also assumes you have met casting with ::. It covers the PostgreSQL date and time types, the difference between timestamp and timestamptz, time zone conversion, and interval arithmetic.4 min readSELECT and INSERT statements and run them in psql. It also assumes you have met the main built-in types: integers, numeric, text, dates and jsonb. It covers how PostgreSQL converts a value from one type to another, which conversions happen without4 min readuuid type in PostgreSQL: what it stores, how to generate values, and when it is a better or worse primary key than a bigint identity column. It assumes you know basic SQL (SELECT, INSERT, CREATE TABLE), can run queries in psql, and have read the chapter on integer6 min readSELECT, INSERT and CREATE TABLE, and that you know what an index is. It covers the jsonb type: how it differs from json, the operators you use daily, how to index it, and where it causes problems.4 min readCREATE TABLE, INSERT and SELECT, and that you know what a column type and a constraint are. It also assumes you can run queries in psql or another client. You should have read the earlier chapters on text and casting.5 min readCREATE TABLE and INSERT statements, run queries in psql, and know what a CHECK constraint does. It builds on the earlier chapters on character types and casting.4 min readSELECT, INSERT, CREATE TABLE) and can run queries in psql or another client. It also assumes you know what a constraint is. You should have read the chapters on integers and on dates and timestamps, because range types are built on top of those typ5 min readtext is and what a CHECK constraint does. It covers bytea, PostgreSQL's type for raw bytes: how values are written and displayed, which functions work on them, and when to store files in the database at 4 min readCHECK and NOT NULL constraints work, and ho4 min readinet, cidr, macaddr and macaddr8. It assumes you can create tables and run queries in psql. It also assumes you know what an IPv4 address, a subnet mask and CIDR notation such as 10.0.0.0/8 are. It builds on the casting chapter, 4 min readCREATE TABLE, INSERT and SELECT in psql, and that you know what a column and a constraint are. It also assumes you have read the earlier chapters on integers, numeric, floating point, text, dates and times, UUIDs, jsonb and enums. Here you combine those pie6 min read