On 01/25/2010 10:24 AM, Bob Pawley wrote:
The suggestions received have worked well for one update in the row.
However, if I make any other update on the same row the trigger fires
and more inserts are generated.
However. I have found that the 8.5 alpha version has this addition -
http://devel
t;
To: "Bob Pawley"
Cc: "Tom Lane" ; "Postgresql"
Sent: Saturday, January 23, 2010 10:06 AM
Subject: Re: [GENERAL] Old/New
On Saturday 23 January 2010 7:51:28 am Bob Pawley wrote:
I havn't been able to find documentation on how to use \d. When I open
t
On Saturday 23 January 2010 7:51:28 am Bob Pawley wrote:
> I havn't been able to find documentation on how to use \d. When I open the
> psql interface (through either port ) it asks for a password but doesn't
> allow any entry of a password.
That would depend on the settings in pg_hba.conf, whethe
On 23/01/2010 15:51, Bob Pawley wrote:
> I havn't been able to find documentation on how to use \d. When I open
Hi Bob,
In brief:
\dt lists all the tables in the current schema
\d gives the structure of the named table
.. and loads of others. The docs are here:
http://www.postgresql.
tion of which I wasn't
aware.
Bob
- Original Message -
From: "Adrian Klaver"
To: "Bob Pawley"
Cc: "Tom Lane" ; "Postgresql"
Sent: Friday, January 22, 2010 3:37 PM
Subject: Re: [GENERAL] Old/New
On Friday 22 January 2010 3:25:34 pm Bob
On Friday 22 January 2010 3:25:34 pm Bob Pawley wrote:
> No
>
> The table p_id.processes is the start of the fluid_id ident and that column
> is serial.
>
> Bob
>
Per Tom's suggestion can we see \d for p_id.processes and for good measure
p_id.devices ?
--
Adrian Klaver
adrian.kla...@gmail.com
No
The table p_id.processes is the start of the fluid_id ident and that column
is serial.
Bob
- Original Message -
From: "Adrian Klaver"
To: "Bob Pawley"
Cc: "Tom Lane" ; "Postgresql"
Sent: Friday, January 22, 2010 3:19 PM
Subject: Re:
On Friday 22 January 2010 3:05:54 pm Bob Pawley wrote:
> This is the whole trigger
>
>
>
> 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_i
Original Message -
From: "Adrian Klaver"
To: "Tom Lane"
Cc: "Bob Pawley" ; "Postgresql"
Sent: Friday, January 22, 2010 3:01 PM
Subject: Re: [GENERAL] Old/New
On Friday 22 January 2010 2:05:02 pm Tom Lane wrote:
"Bob Pawley" writ
On Friday 22 January 2010 2:05:02 pm Tom Lane wrote:
> "Bob Pawley" writes:
> > Instead I get two identical rows inserted containing the fluid_id =
> > '3501' and 'Pump #1'.
>
> Seems like the only way that's possible with the INSERT .. VALUES
> formulation is if the trigger function gets execute
"Bob Pawley" writes:
> Instead I get two identical rows inserted containing the fluid_id = '3501'
> and 'Pump #1'.
Seems like the only way that's possible with the INSERT .. VALUES
formulation is if the trigger function gets executed twice. Maybe you
accidentally created two instances of the t
d = '3501'
and 'Pump #1'.
Bob
- Original Message -
From: "Adrian Klaver"
To: "Bob Pawley"
Cc: "Tom Lane" ; "Postgresql"
Sent: Friday, January 22, 2010 1:24 PM
Subject: Re: [GENERAL] Old/New
On 01/22/2010 01:16
On 01/22/2010 01:16 PM, Bob Pawley wrote:
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
This is insufficient detail. What is the row? What are the
o: "Bob Pawley"
Cc: "Tom Lane" ; "Postgresql"
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,
proces
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'
the
ginally posted. Is the above still
causing problems?
Yes. The above inserts two versions of the same row.
Bob
- Original Message -
From: "Adrian Klaver"
To: "Bob Pawley"
Cc: "Tom Lane" ; "Postgresql"
Sent: Friday, January 22, 2010 12:34 PM
S
On 01/22/2010 11:20 AM, Bob Pawley wrote:
I haven't found any documentation on how the underlying structure of
PostgreSQL actually operates. So I have had to extrapolate.
I think what you are saying is that on an update of a field the whole
row which includes that field is affected to the extent
"Bob Pawley" writes:
> I haven't found any documentation on how the underlying structure of
> PostgreSQL actually operates. So I have had to extrapolate.
> I think what you are saying is that on an update of a field the whole row
> which includes that field is affected to the extent that the w
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
- Original Message -
From: "Tom Lane"
"Bob Pawley" writes:
> Following is the format with which I have had great success using "New" in
> After Insert triggers.
> Insert into p_id.devices (p_id_id, process_id, fluid_id, status,
> process_graphics_id, device_description)
> select (p_id.processes.p_id_id), (p_id.processes.process_i
e"
To: "Bob Pawley"
Cc: "Postgresql"
Sent: Thursday, January 21, 2010 3:16 PM
Subject: Re: [GENERAL] Old/New
"Bob Pawley" writes:
I am getting a strange result when using the following -
Select fluid_id into fluidid
from p_id.processes
where new.pump1 =
"Bob Pawley" writes:
> I am getting a strange result when using the following -
> Select fluid_id into fluidid
> from p_id.processes
> where new.pump1 = 'True'
> and old.pump1 = 'False'
> or old.pump1 is null;
> The fluid_id return is fine when there is a single row. However with two
> ro
22 matches
Mail list logo