Re: DELETE with JOIN

Поиск
Список
Период
Сортировка
От felix@crowfix.com
Тема Re: DELETE with JOIN
Дата
Msg-id 20080807213546.GA11185@crowfix.com
обсуждение исходный текст
Ответ на Re: DELETE with JOIN  (Frank Bax <fbax@sympatico.ca>)
Список pgsql-sql
On Thu, Aug 07, 2008 at 04:01:29PM -0400, Frank Bax wrote:

> You mentioned that the process of insert/delete is to be repeated.  Are all 
> the rows that were inserted; the same ones that will be deleted when the 
> cycle is complete?  If yes; then after you delete this batch of rows; add a 
> 'junky' column and populate with any value different from the default.  
> Your mass-insert should populate with the default value; and you can delete 
> based on this value.

That would work, and might even be possible, but adding a column just
to mark test data doesn' quite sit right.  This data is, yucch, tax
data, and I have been generating test cases with bogus country names,
like Fredonia -- the taxes themselves are in a dozen tables with
foreign key references holding them together, one of them being the
country name.  I was sort of doing what you suggest by using bogus
country names, but that's only indirect.  To add a column to every
concerned table would be a pain for other reasons.

--            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.    Felix Finch: scarecrow repairman & rocket
surgeon/ felix@crowfix.com GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
 
I've found a solution to Fermat's Last Theorem but I see I've run out of room o


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

Предыдущее
От: Mark Roberts
Дата:
Сообщение: Re: DELETE with JOIN
Следующее
От: "Yura Gal"
Дата:
Сообщение: Re: enumerate groups given a certain value