Hi All,

I am using a cascade delete on the following table:

vid    vname        parentname
1     [EMAIL PROTECTED]
2     [EMAIL PROTECTED]         [EMAIL PROTECTED]
3     [EMAIL PROTECTED]         [EMAIL PROTECTED]
4     [EMAIL PROTECTED]         [EMAIL PROTECTED]
5     [EMAIL PROTECTED]         [EMAIL PROTECTED]

So the delete cascade states if I am deleting a row whose vname matches the parentname delete those rows and it works fine.

I just changed the values of parentname (but the vname values stay the same)

vid    vname        parentname
1     [EMAIL PROTECTED]
2     [EMAIL PROTECTED]         n1
3     [EMAIL PROTECTED]         n1
4     [EMAIL PROTECTED]         n1
5     [EMAIL PROTECTED]         n3

Is there a way to do the same cascade delete with these values? I can select the correct info from vname in a query:

select substring(vname, from 0 for position('@' in vname)) from table1;

This works, so I tried to put that in the cascade but it failed.

Is there any way to accomplish this?

    Thanks

        Glenn MacGregor


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to