Vector
Vector

Reputation: 77

how to create type using specified schema in postgresql?

I want to create a type or sequence with my owner schema, but when I create, it always in public schema. what should I do? Can you help me ?

Upvotes: 0

Views: 1217

Answers (1)

kriszb12
kriszb12

Reputation: 3

CREATE TYPE my_schema.my_type as ENUM ('yes', 'no', 'maybe');

So basically you put the schema name before the type name and separate them with a dot.

Upvotes: 0

Related Questions