Handling case variatiions on a user defined type?

Поиск
Список
Период
Сортировка
От stan
Тема Handling case variatiions on a user defined type?
Дата
Msg-id 20190915123731.GA26465@panix.com
обсуждение исходный текст
Ответы Re: Handling case variatiions on a user defined type?  (Olivier Gautherot <ogautherot@gautherot.net>)
Список pgsql-general
I have several enumerated types that look like:

CREATE TYPE confidence_level AS ENUM ('HIGH' ,
                                'MEDIUM' ,
                                'LOW' ,
                                 'WAG');


I have someone creating data for this project in spreadsheets, and then am
importing the data using \copy.

Problem is the data in the spreadsheets is entered in mixed case.

Is there a way that I can use the type itself, to enforce something like a
to_upper(). Or is there a better way to  "human proof" this?

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                        -- Benjamin Franklin



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Can I wrtie a function that has a BEFORE trigger that is notcolumn name dpendent?
Следующее
От: Olivier Gautherot
Дата:
Сообщение: Re: Handling case variatiions on a user defined type?