Blip
Blip

Reputation: 3171

is it possible to use enum type of one schema in another schema in postgresql

I have a problem here about postgresql. I have defined an enum type abc in schema X. Now I want to create a table having a column with datatype abc in schema Y. Is it possible to do such a thing? If yes how?

Upvotes: 5

Views: 2515

Answers (1)

user330315
user330315

Reputation:

You need to qualify the schema, when defining the data type:

create table y.other_table
(
   some_enum   x.abc
);

Upvotes: 8

Related Questions