What are the characteristics of a good user-defined data type?

Поиск
Список
Период
Сортировка
От Tim Hart
Тема What are the characteristics of a good user-defined data type?
Дата
Msg-id 000001c68a33$fdb4d650$0a32000a@hartt
обсуждение исходный текст
Ответы Re: What are the characteristics of a good user-defined data type?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

List,

 

This is a general question for my own education. Something I read earlier today triggered some ideas in my head, and out of curiosity I’m researching and learning.

 

What characteristics of data sets lend themselves to reasonable user-defined data types? Are there characteristics of a data type that would limit its usefulness?

 

I’ve reviewed the PostgreSQL documentation on user defined data types. It seems that data types that can’t be ordered or compared for equality would be bad candidates. After all, if a data type can’t be indexed or used in a where clause, what value does a custom type bring over a binary or textual representation?

 

Additionally, the careful tone in the documentation regarding the definition of the comparison and equality operators suggests that these definitions may be an exceptionally delicate matter. Any experience or suggestions on the matter?

 

Tim Hart

 

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

Предыдущее
От: John Sidney-Woollett
Дата:
Сообщение: Re: Best open source tool for database design / ERDs?
Следующее
От: "Leif B. Kristensen"
Дата:
Сообщение: Re: [pgsql-advocacy] Me And My Database