Re: Old/New

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Old/New
Дата
Msg-id 4B5A1496.7070003@gmail.com
обсуждение исходный текст
Ответ на Re: Old/New  ("Bob Pawley" <rjpawley@shaw.ca>)
Список pgsql-general
On 01/22/2010 01:05 PM, Bob Pawley wrote:
>> Begin
>>
>> If new.pump1 = 'True'
>>
>> then
>>
>> Insert into p_id.devices (p_id_id, process_id, fluid_id, status,
>> process_graphics_id, device_description)
>> values (new.p_id_id, new.process_id, new.fluid_id, 'Pump #1', '11',
>> 'Pump');
>>
>> End if;
>>
>> If new.pump2 = 'True'
>>
>> then
>>
>> Insert into p_id.devices (p_id_id, process_id, fluid_id, status,
>> process_graphics_id, device_description)
>> values (new.p_id_id, new.process_id, new.fluid_id, 'Pump #2', '11',
>> 'Pump');
>>
>> End if ;
>>
>> RETURN NULL;
>>
>> END;
>>
>> Bob
>>
>>
>
> This is different from what you originally posted. Is the above still
> causing problems?
>
> Yes. The above inserts two versions of the same row.
>
>

Some detail is in order. Two versions of what row?  Also what is your
update statement?
--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: "Bob Pawley"
Дата:
Сообщение: Re: Old/New
Следующее
От: "Bob Pawley"
Дата:
Сообщение: Re: Old/New