| От | Tom Lane |
|---|---|
| Тема | Re: sql (Stored procedure) design question |
| Дата | |
| Msg-id | 1370.1137042965@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | sql (Stored procedure) design question (Assad Jarrahian <jarraa@gmail.com>) |
| Ответы |
Re: sql (Stored procedure) design question
|
| Список | pgsql-general |
Assad Jarrahian <jarraa@gmail.com> writes:
> A column of type text contains username's and groupname's followed
> by comma (eg. 'jarraa, mooreg3, keith') [it is stored this way
> because it will be displayed in this format].
You should *not* allow display concerns to drive your database layout.
The pain you are now experiencing is just the first taste of why that's
a bad idea.
Store the usernames and groupnames separately. If you have an
application that's too dumb to concatenate them for itself, you
can make a view on the table that provides the display representation
the application needs.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера