Re: Old/New

From: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
To: "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Postgresql" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Old/New
Date: 2010-01-22 21:16:25
Message-ID: 0E46FFD75A66489C8FA52D048727E71C@desktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a single row that is being duplicated on insert.

Update statement -
update p_id.processes
set pump1 = 'True'
where p_id.processes.fluid_id = '3501' ;

The proper field is updated.

Bob

----- Original Message -----
From: "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com>
To: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>; "Postgresql"
<pgsql-general(at)postgresql(dot)org>
Sent: Friday, January 22, 2010 1:11 PM
Subject: Re: [GENERAL] Old/New

> 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(dot)klaver(at)gmail(dot)com
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

  • Re: Old/New at 2010-01-22 21:11:50 from Adrian Klaver

Responses

  • Re: Old/New at 2010-01-22 21:24:27 from Adrian Klaver

Browse pgsql-general by date

  From Date Subject
Next Message Sarkar, Sudipta 2010-01-22 21:19:16 initdb failes on Traditional chinese machine when postgres install directory contains chinese characters.
Previous Message Adrian Klaver 2010-01-22 21:11:50 Re: Old/New