To: Bob Pawley rjpaw...@shaw.ca
Cc: Tom Lane t...@sss.pgh.pa.us; Postgresql
pgsql-general@postgresql.org
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
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 -
wasn't
aware.
Bob
- Original Message -
From: Adrian Klaver adrian.kla...@gmail.com
To: Bob Pawley rjpaw...@shaw.ca
Cc: Tom Lane t...@sss.pgh.pa.us; Postgresql
pgsql-general@postgresql.org
Sent: Friday, January 22, 2010 3:37 PM
Subject: Re: [GENERAL] Old/New
On Friday 22 January 2010
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 tablename gives the structure of the named table
.. and loads of others. The docs are here:
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, whether
: Postgresql pgsql-general@postgresql.org
Sent: Thursday, January 21, 2010 3:16 PM
Subject: Re: [GENERAL] Old/New
Bob Pawley rjpaw...@shaw.ca 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
Bob Pawley rjpaw...@shaw.ca 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),
, January 22, 2010 9:56 AM
Subject: Re: [GENERAL] Old/New
Bob Pawley rjpaw...@shaw.ca 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
Bob Pawley rjpaw...@shaw.ca 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
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
versions of the same row.
Bob
- Original Message -
From: Adrian Klaver adrian.kla...@gmail.com
To: Bob Pawley rjpaw...@shaw.ca
Cc: Tom Lane t...@sss.pgh.pa.us; Postgresql
pgsql-general@postgresql.org
Sent: Friday, January 22, 2010 12:34 PM
Subject: Re: [GENERAL] Old/New
On 01/22/2010
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'
...@shaw.ca
Cc: Tom Lane t...@sss.pgh.pa.us; Postgresql
pgsql-general@postgresql.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
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
adrian.kla...@gmail.com
To: Bob Pawley rjpaw...@shaw.ca
Cc: Tom Lane t...@sss.pgh.pa.us; Postgresql
pgsql-general@postgresql.org
Sent: Friday, January 22, 2010 1:24 PM
Subject: Re: [GENERAL] Old/New
On 01/22/2010 01:16 PM, Bob Pawley wrote:
I have a single row that is being duplicated on insert
Bob Pawley rjpaw...@shaw.ca 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
On Friday 22 January 2010 2:05:02 pm Tom Lane wrote:
Bob Pawley rjpaw...@shaw.ca 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
Lane t...@sss.pgh.pa.us
Cc: Bob Pawley rjpaw...@shaw.ca; Postgresql
pgsql-general@postgresql.org
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 rjpaw...@shaw.ca writes:
Instead I get two identical rows
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_id, 'Pump
, January 22, 2010 3:19 PM
Subject: Re: [GENERAL] Old/New
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
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
--
Hi
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 rows,
and updating only one of the
Bob Pawley rjpaw...@shaw.ca 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
23 matches
Mail list logo