Reg: Custom Data Types in PostgreSQL

Поиск
Список
Период
Сортировка
От Raj K
Тема Reg: Custom Data Types in PostgreSQL
Дата
Msg-id 6373f61d0811212018q43e6e0e3wfcc0f594186da13@mail.gmail.com
обсуждение исходный текст
Ответы Re: Reg: Custom Data Types in PostgreSQL  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-general
Hi all,
    I am not an expert in DB. So please excuse, if the question is stupid.
 
    In PostgreSQL, we do support custom data types - say enum type.
    --> CREATE TYPE testtype AS ENUM {'test1', 'test2'};
    Now, I was wondering whether we should be using a different table or the enum itself for the same?
    --> CREATE TABLE testtypetable { testtype varchar(3) PRIMARY KEY, id serial };
    A new table would help in any modification of enum values, right?
    But then there is a mechanism to create this type, so there must be some extremely pertinent reason for having the same.
    Other than ease of use, I couldnt find any.

    Could anyone help me out on the same?

Regards
Raj

В списке pgsql-general по дате отправления:

Предыдущее
От: pwillis
Дата:
Сообщение: Re: referring to a different database from a trigger
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Reg: Custom Data Types in PostgreSQL