Re: Old/New

From: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
To: <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-25 18:24:27
Message-ID: 63CE5E960EEE4ABE9F1114B3CABB300E@desktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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://developer.postgresql.org/pgdocs/postgres/release-8-5.html

"Add a WHEN clause to CREATE TRIGGER, allowing a boolean expression to be
checked to determine whether the trigger should be fired."

Would this change solve my problem, or is there another solution around?

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: 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
>> 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 you have
> passwords
> enabled for the connection or not. I am not sure what you either port? Are
> you
> referring to the port address and the local socket?
>
>>
>> However, after my last e-mail to you, I came across something
>> interesting -
>> at least to me.
>>
>> I use pg_admin scripts to modify triggers.
>>
>> Looking through pg_admin at all of the triggers on the p_id.processes
>> table
>> I just happened to click on the trigger we have been discussing and then
>> clicked its refresh button.
>>
>> Using the same update statement and the same After Update trigger that
>> inserted two rows into p_id.devices it now inserted only one row and that
>> row was the correct row.
>>
>> I don't know enough about the interaction between the unrefreshed copy of
>> a
>> trigger held by pg_admin and the updated trigger installed in the server
>> to
>> comment - however there does seem to be a connection of which I wasn't
>> aware.
>
> Can't help you there I don't use pgAdmin.
>
>>
>> Bob
>>
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com

In response to

  • Re: Old/New at 2010-01-23 18:06:21 from Adrian Klaver

Responses

  • Re: Old/New at 2010-01-25 18:38:52 from Adrian Klaver

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-01-25 18:31:01 Re: Fwd: Questions about connection clean-up and "invalid page header"
Previous Message Andreas Kretschmer 2010-01-25 17:23:17 Re: Log full of: statement_timeout out of the valid range.