Search Postgresql Archives

Re: sql (Stored procedure) design question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Assad Jarrahian <jarraa@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux