| От | Seb |
|---|---|
| Тема | enum data type vs table |
| Дата | |
| Msg-id | 87ipt8tz5h.fsf@kolob.subpolar.dyndns.org обсуждение исходный текст |
| Ответы |
Re: enum data type vs table
|
| Список | pgsql-sql |
Hi, Are there any guidelines for deciding whether to 1) create an enum data type or 2) create a table with the set of values and then have foreign keys referencing this table? Some fields in a database take a small number of values, and I'm not sure which of these routes to take. The enum data type seems like a clean way to handle this without creating a constellation of tables for all these values, but if one wants to add a new label to the enum or make changes to it at some point, then the tables using it have to be recreated, so it's quite rigid. Have I got this right? Thanks. -- Seb
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера