Problem:
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].
What is needed is a constrain check. To make sure that every time a
row is inserted into the table, this column (text) gets checked to
make sure that all the username/group name in the text exists in the
db (they are primary key columns of two tables).
I would like to use pgsql to write a stored procedure, but I dont know
how to split the text field up and then send them to do a constrain
check with the other tables.
I initially get this in java and then use jdbc, so if there is a
better way you can think of, feel free to comment.
Any help would be much appreciated. Thanks.
-assad