Re: [SQL] Triggers do not fire

2001-10-17 Thread Jason Earl
I can vouch for that. I have several tables with 10 to 16 million entries in much the same sort of setup as you are describing (primary key, timestamp, value). PostgreSQL is will quite happily use the timestamp indexes when accessing this table, and it doesn't default to a sequential scan until

Re: [SQL] Triggers do not fire

2001-10-17 Thread Reiner Dassing
Hello Tom! Thank you for your help! Your hints did solve the asked problem. The update trigger is fired if there is a row in the table test to be updated. But, behind my question there was another design (philosophie) which I am trying to solve by the means of different triggers. This is off

Re: [SQL] Triggers do not fire

2001-10-17 Thread Tom Lane
Reiner Dassing <[EMAIL PROTECTED]> writes: > I have a table which has a lot of entries (some x millions) of the kind > (id, timestamp, value) > The access (selects) is concentrated to the timely last some thousands > entries. > To adapt this fact I want to setup a "virtual" table - test in my > e

Re: [SQL] Triggers do not fire

2001-10-16 Thread Aasmund Midttun Godal
Your update trigger is fired FOR EACH ROW and no rows are updated i.e. no trigger fired! On Tue, 16 Oct 2001 14:48:59 +0200, Reiner Dassing <[EMAIL PROTECTED]> wrote: > Hallo! > > I have written a very small test procedure to show a possible error > on PostgreSQL V7.1.1. > A trigger does not fi

Re: [SQL] Triggers do not fire

2001-10-16 Thread Tom Lane
Reiner Dassing <[EMAIL PROTECTED]> writes: > I have written a very small test procedure to show a possible error > on PostgreSQL V7.1.1. The error is yours: you set up the trigger function to return NULL, which means it's telling the system not to allow the INSERT or UPDATE. > INSERT INTO test V

Re: [SQL] Triggers do not fire

2001-10-16 Thread Stephan Szabo
> The result is as follows: > INSERT INTO test VALUES(1,'2000-10-11 12:00:00',-20.2); > NOTICE: Fired INSERT > INSERT 0 0 > UPDATE test SET value = 1000.0 WHERE epoch = '2000-10-11 12:10:00' AND > sensor_id = 1; > UPDATE 0 > > The insert notice can be shown! > The update notice is not there! >

[SQL] Triggers do not fire

2001-10-16 Thread Reiner Dassing
Hallo! I have written a very small test procedure to show a possible error on PostgreSQL V7.1.1. A trigger does not fire the function on update but on inserts. Does someone have made the same experiences? Here is the short example which is doing nothing important, just showing the situation: D