Data Types
Casting values
-- This way postgres will treat it as `integer` instead of `numeric`
SELECT (2.0::integer)Data Types
Array
Type
Description
How values are inserted
INSERT INTO table_name (col_array)
VALUES (ARRAY ['a', 'b', 'c'])
;Selecting values
Comparing arrays
Combining arrays
Adding values to array
Remove values from array
Get arrays metadata
Search values in array
Unesting array values
Bit String
Type
Description
Boolean
Type
Description
Composite (Objects)
Type
Description
How to insert with this data type
How to select the data
Character
Type
Description
Convert function (to_char)
Date/Time
Type
Description
Operations with dates and times
Operations with timezones
Showing Postgres timezone
Handling timezones
Convert function (to_date) (to_timestamp)
Convert dates to formats
Extracting data from a date value
Check for date ranges overlap
Showing Age between two dates
Using infinity as date value
Enumerated
Type
Description
Add more values to the Enum
How to insert values with Enum
Drop Enum types
Geometric
Type
Description
Json & Jsonb
Type
Description
How values are inserted
Selecting values
Update existing object values
Adding new object values
Delete object values
Output a table contents in json
Network Address
Type
Description
Numeric
Type
Subtype
Description
Convert function (to_number)
Range
Range Type
Description
Checking for date range overlap
UUID
Type
Description
Last updated