Search Postgresql Archives

sql (Stored procedure) design question

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

 



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


[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