Re: [SQL] new rule syntax?

2006-02-06 Thread Richard Huxton
A. R. Van Hook wrote: I have two tables defined as: checks (ckidint NOT null PRIMARY KEY, payto text, notes text, ckdate date, printed int default 0, tdate timestamp

[SQL] Trigger on a column

2006-02-06 Thread Josep Sanmartí
Hi, My trigger's running on a table that works perfectly. This trigger calls a function that inserts or modifies a row of a different table. My problem is that I need to optimize this trigger, and the only way that I've found is to fire the trigger when certain table fields are modified. I

Re: [SQL] Trigger on a column

2006-02-06 Thread Josep Sanmartí
Hi, readding around I just found this: The CREATE TRIGGER statement in PostgreSQL implements a subset of the SQL99 standard. (There are no provisions for triggers in SQL92.) The following functionality IS MISSING: * SQL99 allows triggers to fire on updates to specific columns (e.g., AFTER UPDA

Re: [SQL] Trigger on a column

2006-02-06 Thread Richard Huxton
Josep Sanmartí wrote: Hi, readding around I just found this: The CREATE TRIGGER statement in PostgreSQL implements a subset of the SQL99 standard. (There are no provisions for triggers in SQL92.) The following functionality IS MISSING: * SQL99 allows triggers to fire on updates to specific col

Re: [SQL] Function Dependency

2006-02-06 Thread Karsten Hilbert
On Sun, Feb 05, 2006 at 07:18:33PM -0700, Tony Wasson wrote: > > I am maintaining an application that has over 400 procedures and functions > > written in plsql, and around 100 tables. > > I want to generate a function dependency chart to depict the following: > > > > 1. Inter function/procedur

[SQL] no notnull values, invalid stats?

2006-02-06 Thread Markus Schaber
Hello, The following message occasionally appears in my postgresql log - from temporal corellation, it might be caused by autovacuum. NOTICE: no notnull values, invalid stats Is that anything I should care about? I'm running debianized postgresql 8.1.0-3. Markus -- Markus Schaber | Logical

[SQL] Trigger efficiency

2006-02-06 Thread Josep Sanmartí
Hi, I've the following problem and I don't know how to solve it: There is a table with about 10-12 fields, a couple of those fields are updated very often (about 30 times / minute or even more). This is my table (more or less): crete table monitor( time Timestamp, time2 timestamp, .

Re: [SQL] no notnull values, invalid stats?

2006-02-06 Thread Alvaro Herrera
Markus Schaber wrote: > Hello, > > The following message occasionally appears in my postgresql log - from > temporal corellation, it might be caused by autovacuum. > > NOTICE: no notnull values, invalid stats I see no such message in 8.1 sources. Is this verbatim or did you translate it? --

Re: [SQL] no notnull values, invalid stats?

2006-02-06 Thread Markus Schaber
Hi, Alvaro, Alvaro Herrera wrote: >>The following message occasionally appears in my postgresql log - from >>temporal corellation, it might be caused by autovacuum. >> >>NOTICE: no notnull values, invalid stats > > I see no such message in 8.1 sources. Is this verbatim or did you > translate

Re: [SQL] Trigger efficiency

2006-02-06 Thread Craig Servin
I do not know of a way to make your trigger run less often, but you could only have it do the insert if something changes. This is what we do: CREATE or replace FUNCTION UPDATE_SERVER_HST() RETURNS TRIGGER AS ' begin if (OLD.ADD_DATE is distinct from NEW.ADD_DATE or OLD.HOSTNAME

Re: [SQL] no notnull values, invalid stats?

2006-02-06 Thread Michael Fuhr
On Mon, Feb 06, 2006 at 03:32:32PM +0100, Markus Schaber wrote: > Alvaro Herrera wrote: > >>The following message occasionally appears in my postgresql log - from > >>temporal corellation, it might be caused by autovacuum. > >> > >>NOTICE: no notnull values, invalid stats > > > > I see no such m