Skip to content
Advertisement

Tag: enums

PostgreSQL conditional ENUM

Let’s say I have a table inventory with columns item_id, category and size. item_id is auto incremented integer (primary key) category is ENUM size is ENUM I want size to be a conditional ENUM. …

SQL: error when creating a foreign table that has an enum column

I’m creating a foreign table (foo_table) in database_a. foo_table lives in database_b. foo_table has an enum (bar_type) as one of its columns. Because this enum is in database_b, the creation of the foreign table fails in database_a. database_a doesn’t understand the column type. Running the following in database_a CREATE FOREIGN TABLE foo_table (id integer NOT NULL, bar bar_type) SERVER database_b

Advertisement