PDA

View Full Version : Trigger in PostgreSQL 7.+


Arnx
05-30-02, 03:06
Have a problem, where i was create trigger, it's not showed in list triggers of db. Its relate with numbers indexes on table? (becouse where i did 4th trigger i saw it). Can somebody give me links or advise?

eperich
06-01-02, 18:28
be more specific

You want to create a trigger but the statement has no affect.

after 4 tries you got the trigger in the database.

can you show me the trigger code?

You said the trigger is related to indexes in table?
what do you mean exactly with that?

Arnx
06-03-02, 03:01
table - very simple
idfirm INT2 NOT NULL PRIMARY KEY,
mainfirm INT2 NOT NULL,
namefirm VARCHAR(80) NOT NULL UNIQUE,
shortname VARCHAR(20) NOT NULL UNIQUE,
inn VARCHAR(16) NOT NULL,
address VARCHAR(100),
phone VARCHAR(30),
fax VARCHAR(30),
email VARCHAR(60),
prup NUMERIC(6,3)
--
function already exist
trigger simple too
CREATE TRIGGER tf5ownf_OnI
BEFORE INSERT ON f5ownfirms FOR EACH ROW
EXECUTE PROCEDURE f5ownfOnI();
--
when it's go that's ok? succesful--
Your SQL-query has been executed successfully

Affected Rows: 0
SQL-query:
CREATE TRIGGER t8f5ownf_OnI
BEFORE INSERT ON f5ownfirms FOR EACH ROW
EXECUTE PROCEDURE f5ownfOnI()

but "No Triggers found" when i try see triggers(((

eperich
06-09-02, 18:29
This is a very strange error.

As far I can see there is no error.

The only thing that I can say is try a rule instead of this trigger.

Maybe there is a problem with the OID of this trigger

Try also CREATE OR REPLACE TRIGGER

But at the moment I don't know if this is implemented for triggers but I think so.