Optional properties in a composite type (Postgresql)

Viewed 158

I've created a composite type which corresponds to my interface in Typescript for one of my Schemas; however I can't seem to find any documentation pointing on how to do that.

Here's an example:

CREATE TYPE PROMOTES AS (level INT, roles TEXT[], strip_roles BOOLEAN);

and I wish to mark strip_roles as an optional property, with a default value of true.

Is this even possible? And if yes, how would I go about it?

0 Answers
Related