.dsy:it.
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Basi di dati ~ informatica triennale (http://www.dsy.it/forum/forumdisplay.php?forumid=211)
-- trigger postgres (http://www.dsy.it/forum/showthread.php?threadid=41920)


Posted by pirlo21 on 21-05-2011 00:01:

trigger postgres

sapete se si possono creare più trigger che scattano in contemporanea sulla stessa tabella? Oppure se un trigger può far partire due funzioni?


Posted by number15 on 21-05-2011 07:53:

Postgres no idea, ma ti dico per mysql.
1) è possibile creare un solo trigger per lo stesso evento per ogni tabella.
2) con la sintassi begin...end, dovresti poter scrivere dentro tutte le query che vuoi.
Prova a vedere se c'è l'equivalente per postgres

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com


Posted by pirlo21 on 21-05-2011 16:06:

il manuale di postgres è na schifezza da sto punto di vista...non si capisce niente....
sta di fatto che a me il primo trigger funziona, il secondo pare di no...non so se è un problema mio che ho sbagliato qualcosa oppure se non si può fare


Posted by number15 on 21-05-2011 19:04:

mmm dal manuale pare si possa:
"If more than one trigger is defined for the same event on the same relation, the triggers will be fired in alphabetical order by trigger name."

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com


Posted by pirlo21 on 23-05-2011 12:53:

grazie...confermo che si può fare... ho provato e riprovato e in effetti funziona


All times are GMT. The time now is 19:01.
Show all 5 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.