November 2019
Beginner to intermediate
470 pages
11h 59m
English
In most other database systems, stored procedures are only used with primitive data types, such as integers, numeric, varchar, and so on. However, PostgreSQL is very different. We can use all the data types that are available to us. This includes primitive, composite, and custom types of data. There are simply no restrictions as far as data types are concerned. To unleash the full power of PostgreSQL, composite types are highly important, and are often used by extensions that are found on the internet. The following example shows how a composite type can be passed to a function, and how it can be used internally. Finally, the composite type will be returned again:
CREATE TYPE my_cool_type AS (s text, t text); CREATE ...
Read now
Unlock full access