delete cascade question

Поиск
Список
Период
Сортировка
От Glenn MacGregor
Тема delete cascade question
Дата
Msg-id 408821D6.2000106@highstreetnetworks.com
обсуждение исходный текст
Ответы Re: delete cascade question  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-admin
Hi All,

I am using a cascade delete on the following table:

vid    vname        parentname
1     n1@test.com
2     n2@test.com         n1@test.com
3     n3@test.com         n1@test.com
4     n4@test.com         n1@test.com
5     n5@test.com         n3@test.com

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     n1@test.com
2     n2@test.com         n1
3     n3@test.com         n1
4     n4@test.com         n1
5     n5@test.com         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



В списке pgsql-admin по дате отправления:

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: Re: Real time replication of PG DBs accross two servers - any experiences?
Следующее
От: "Eloy Mier Pérez"
Дата:
Сообщение: How configure Oracle 9i not case sensitive...