Postgres after delete trigger does not fire2019 Community Moderator Electionexpand a varchar column very slowly , why?postgres: upgrade a user to be a superuser?Postgresql -> deadlock from simple update. I can't get the causePostgresql: detecting which foreign key triggered the “on before delete” triggerPostgres using an index for one table but not anotherHow to make SQLAlchemy insert work with Postgres multiprocessing-proof upsert trigger?Find specific data within 365 daysmake django not insert certain fieldsPostgres Copy data from two file in two tableDjango Migration Is Failing
How to explain that I do not want to visit a country due to personal safety concern?
What options are left, if Britain cannot decide?
When to use a slotted vs. solid turner?
Why is a white electrical wire connected to 2 black wires?
Does multi-classing into Fighter give you heavy armor proficiency?
Is "upgrade" the right word to use in this context?
Is it normal that my co-workers at a fitness company criticize my food choices?
Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?
I am confused as to how the inverse of a certain function is found.
Can I use USB data pins as a power source?
Are ETF trackers fundamentally better than individual stocks?
Why did it take so long to abandon sail after steamships were demonstrated?
What's the meaning of a knight fighting a snail in medieval book illustrations?
What is the relationship between relativity and the Doppler effect?
Is there a place to find the pricing for things not mentioned in the PHB? (non-magical)
Why does overlay work only on the first tcolorbox?
Is a party consisting of only a bard, a cleric, and a warlock functional long-term?
Print a physical multiplication table
Aluminum electrolytic or ceramic capacitors for linear regulator input and output?
How are passwords stolen from companies if they only store hashes?
How could an airship be repaired midflight?
What is the adequate fee for a reveal operation?
Official degrees of earth’s rotation per day
Why does a Star of David appear at a rally with Francisco Franco?
Postgres after delete trigger does not fire
2019 Community Moderator Electionexpand a varchar column very slowly , why?postgres: upgrade a user to be a superuser?Postgresql -> deadlock from simple update. I can't get the causePostgresql: detecting which foreign key triggered the “on before delete” triggerPostgres using an index for one table but not anotherHow to make SQLAlchemy insert work with Postgres multiprocessing-proof upsert trigger?Find specific data within 365 daysmake django not insert certain fieldsPostgres Copy data from two file in two tableDjango Migration Is Failing
I created this trigger functions. It works on INSERT and UPDATE. With DELETE operations this function it is not fired. I just tried after and before and the results are the same.
Can anyone find something that justify that ?
DECLARE
v_old_data json;
v_new_data json;
BEGIN
IF (TG_OP = 'UPDATE') THEN
v_old_data := row_to_json(OLD);
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_old_data,v_new_data, current_query());
RETURN NEW;
ELSIF (TG_OP = 'DELETE') THEN
v_old_data := row_to_json(OLD);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_query)
VALUES (TG_TABLE_NAME::TEXT,old.clnt_autorstat,substring(TG_OP,1,1),v_old_data, current_query());
RETURN null;
ELSIF (TG_OP = 'INSERT') THEN
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_new_data, current_query());
RETURN NEW;
ELSE
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - Other action occurred: %, at %',TG_OP,now();
RETURN NULL;
END IF;
EXCEPTION
WHEN data_exception THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [DATA EXCEPTION] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN unique_violation THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [UNIQUE] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN OTHERS THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [OTHER] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
END;
CREATE TRIGGER auditoria_clientes
AFTER INSERT OR DELETE OR UPDATE
ON public.clientes
FOR EACH ROW
EXECUTE PROCEDURE public.auditoria_clientes();
Added the create trigger code.
Table "public.clientes"
Column | Type | Modifiers
----------------------+-----------------------------+----------------------------------------------------------------
clnt_codigo | integer | not null default nextval('clientes_clnt_codigo_seq'::regclass)
clnt_primeinome | character varying(50) |
clnt_ultimonome | character varying(50) |
clnt_genero | character varying(15) |
clnt_tp_pele | character varying(50) |
clnt_dtnasc | date |
clnt_telefone | character varying(50) |
clnt_email | character varying(100) |
clnt_conhecto | character varying(50) |
clnt_obs | character varying(1000) |
clnt_status | character varying(50) |
clnt_timestamp | timestamp without time zone |
clnt_autorstat | character varying(50) |
clnt_morada | character varying(200) |
clnt_codpostal | character varying(8) |
clnt_sms | boolean | default false
clnt_generico | boolean | default false
clnt_mes | integer | default 0
clnt_tipo | character varying(50) |
clnt_lojahabitual | integer | default 0
clnt_spa | boolean | default false
clnt_telefone2 | character varying(50) |
clnt_dtcriacao | date |
clnt_timestampaceita | timestamp without time zone |
Indexes:
"CLIENTES_pkey" PRIMARY KEY, btree (clnt_codigo)
"WDIDX_CLIENTES_CLNT_DTNASC" btree (clnt_dtnasc)
"WDIDX_CLIENTES_CLNT_EMAIL" btree (clnt_email)
"WDIDX_CLIENTES_CLNT_GENERICO" btree (clnt_generico)
"WDIDX_CLIENTES_CLNT_PRIMEINOME" btree (clnt_primeinome)
"WDIDX_CLIENTES_CLNT_TELEFONE" btree (clnt_telefone)
"WDIDX_CLIENTES_CLNT_ULTIMONOME" btree (clnt_ultimonome)
"fki_codpostal" btree (clnt_codpostal)
Triggers:
auditoria_clientes AFTER INSERT OR DELETE OR UPDATE ON clientes FOR EACH ROW EXECUTE PROCEDURE auditoria_clientes()
Added the table description like asked in the comments.
postgresql database-trigger
|
show 4 more comments
I created this trigger functions. It works on INSERT and UPDATE. With DELETE operations this function it is not fired. I just tried after and before and the results are the same.
Can anyone find something that justify that ?
DECLARE
v_old_data json;
v_new_data json;
BEGIN
IF (TG_OP = 'UPDATE') THEN
v_old_data := row_to_json(OLD);
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_old_data,v_new_data, current_query());
RETURN NEW;
ELSIF (TG_OP = 'DELETE') THEN
v_old_data := row_to_json(OLD);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_query)
VALUES (TG_TABLE_NAME::TEXT,old.clnt_autorstat,substring(TG_OP,1,1),v_old_data, current_query());
RETURN null;
ELSIF (TG_OP = 'INSERT') THEN
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_new_data, current_query());
RETURN NEW;
ELSE
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - Other action occurred: %, at %',TG_OP,now();
RETURN NULL;
END IF;
EXCEPTION
WHEN data_exception THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [DATA EXCEPTION] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN unique_violation THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [UNIQUE] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN OTHERS THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [OTHER] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
END;
CREATE TRIGGER auditoria_clientes
AFTER INSERT OR DELETE OR UPDATE
ON public.clientes
FOR EACH ROW
EXECUTE PROCEDURE public.auditoria_clientes();
Added the create trigger code.
Table "public.clientes"
Column | Type | Modifiers
----------------------+-----------------------------+----------------------------------------------------------------
clnt_codigo | integer | not null default nextval('clientes_clnt_codigo_seq'::regclass)
clnt_primeinome | character varying(50) |
clnt_ultimonome | character varying(50) |
clnt_genero | character varying(15) |
clnt_tp_pele | character varying(50) |
clnt_dtnasc | date |
clnt_telefone | character varying(50) |
clnt_email | character varying(100) |
clnt_conhecto | character varying(50) |
clnt_obs | character varying(1000) |
clnt_status | character varying(50) |
clnt_timestamp | timestamp without time zone |
clnt_autorstat | character varying(50) |
clnt_morada | character varying(200) |
clnt_codpostal | character varying(8) |
clnt_sms | boolean | default false
clnt_generico | boolean | default false
clnt_mes | integer | default 0
clnt_tipo | character varying(50) |
clnt_lojahabitual | integer | default 0
clnt_spa | boolean | default false
clnt_telefone2 | character varying(50) |
clnt_dtcriacao | date |
clnt_timestampaceita | timestamp without time zone |
Indexes:
"CLIENTES_pkey" PRIMARY KEY, btree (clnt_codigo)
"WDIDX_CLIENTES_CLNT_DTNASC" btree (clnt_dtnasc)
"WDIDX_CLIENTES_CLNT_EMAIL" btree (clnt_email)
"WDIDX_CLIENTES_CLNT_GENERICO" btree (clnt_generico)
"WDIDX_CLIENTES_CLNT_PRIMEINOME" btree (clnt_primeinome)
"WDIDX_CLIENTES_CLNT_TELEFONE" btree (clnt_telefone)
"WDIDX_CLIENTES_CLNT_ULTIMONOME" btree (clnt_ultimonome)
"fki_codpostal" btree (clnt_codpostal)
Triggers:
auditoria_clientes AFTER INSERT OR DELETE OR UPDATE ON clientes FOR EACH ROW EXECUTE PROCEDURE auditoria_clientes()
Added the table description like asked in the comments.
postgresql database-trigger
That's the trigger function. Please edit your question and add the correspondingcreate trigger
statement.
– a_horse_with_no_name
Mar 7 at 15:36
Also, are there any other triggers on the table? Ideal would be the output ofd
for the table inpsql
.
– Laurenz Albe
Mar 7 at 15:42
@a_horse_with_no_name i added in the main post the create trigger code.
– José Costa
Mar 7 at 15:57
@LaurenzAlbe there are not any other triggers on the table.
– José Costa
Mar 7 at 15:57
Do you get an exception if you remove theEXCEPTION
clauses?
– Laurenz Albe
Mar 7 at 16:01
|
show 4 more comments
I created this trigger functions. It works on INSERT and UPDATE. With DELETE operations this function it is not fired. I just tried after and before and the results are the same.
Can anyone find something that justify that ?
DECLARE
v_old_data json;
v_new_data json;
BEGIN
IF (TG_OP = 'UPDATE') THEN
v_old_data := row_to_json(OLD);
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_old_data,v_new_data, current_query());
RETURN NEW;
ELSIF (TG_OP = 'DELETE') THEN
v_old_data := row_to_json(OLD);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_query)
VALUES (TG_TABLE_NAME::TEXT,old.clnt_autorstat,substring(TG_OP,1,1),v_old_data, current_query());
RETURN null;
ELSIF (TG_OP = 'INSERT') THEN
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_new_data, current_query());
RETURN NEW;
ELSE
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - Other action occurred: %, at %',TG_OP,now();
RETURN NULL;
END IF;
EXCEPTION
WHEN data_exception THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [DATA EXCEPTION] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN unique_violation THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [UNIQUE] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN OTHERS THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [OTHER] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
END;
CREATE TRIGGER auditoria_clientes
AFTER INSERT OR DELETE OR UPDATE
ON public.clientes
FOR EACH ROW
EXECUTE PROCEDURE public.auditoria_clientes();
Added the create trigger code.
Table "public.clientes"
Column | Type | Modifiers
----------------------+-----------------------------+----------------------------------------------------------------
clnt_codigo | integer | not null default nextval('clientes_clnt_codigo_seq'::regclass)
clnt_primeinome | character varying(50) |
clnt_ultimonome | character varying(50) |
clnt_genero | character varying(15) |
clnt_tp_pele | character varying(50) |
clnt_dtnasc | date |
clnt_telefone | character varying(50) |
clnt_email | character varying(100) |
clnt_conhecto | character varying(50) |
clnt_obs | character varying(1000) |
clnt_status | character varying(50) |
clnt_timestamp | timestamp without time zone |
clnt_autorstat | character varying(50) |
clnt_morada | character varying(200) |
clnt_codpostal | character varying(8) |
clnt_sms | boolean | default false
clnt_generico | boolean | default false
clnt_mes | integer | default 0
clnt_tipo | character varying(50) |
clnt_lojahabitual | integer | default 0
clnt_spa | boolean | default false
clnt_telefone2 | character varying(50) |
clnt_dtcriacao | date |
clnt_timestampaceita | timestamp without time zone |
Indexes:
"CLIENTES_pkey" PRIMARY KEY, btree (clnt_codigo)
"WDIDX_CLIENTES_CLNT_DTNASC" btree (clnt_dtnasc)
"WDIDX_CLIENTES_CLNT_EMAIL" btree (clnt_email)
"WDIDX_CLIENTES_CLNT_GENERICO" btree (clnt_generico)
"WDIDX_CLIENTES_CLNT_PRIMEINOME" btree (clnt_primeinome)
"WDIDX_CLIENTES_CLNT_TELEFONE" btree (clnt_telefone)
"WDIDX_CLIENTES_CLNT_ULTIMONOME" btree (clnt_ultimonome)
"fki_codpostal" btree (clnt_codpostal)
Triggers:
auditoria_clientes AFTER INSERT OR DELETE OR UPDATE ON clientes FOR EACH ROW EXECUTE PROCEDURE auditoria_clientes()
Added the table description like asked in the comments.
postgresql database-trigger
I created this trigger functions. It works on INSERT and UPDATE. With DELETE operations this function it is not fired. I just tried after and before and the results are the same.
Can anyone find something that justify that ?
DECLARE
v_old_data json;
v_new_data json;
BEGIN
IF (TG_OP = 'UPDATE') THEN
v_old_data := row_to_json(OLD);
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_old_data,v_new_data, current_query());
RETURN NEW;
ELSIF (TG_OP = 'DELETE') THEN
v_old_data := row_to_json(OLD);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_old,audi_query)
VALUES (TG_TABLE_NAME::TEXT,old.clnt_autorstat,substring(TG_OP,1,1),v_old_data, current_query());
RETURN null;
ELSIF (TG_OP = 'INSERT') THEN
v_new_data := row_to_json(NEW);
INSERT INTO auditoria.auditoria_geral (audi_table,audi_user,audi_op,audi_new,audi_query)
VALUES (TG_TABLE_NAME::TEXT,new.clnt_autorstat,substring(TG_OP,1,1),v_new_data, current_query());
RETURN NEW;
ELSE
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - Other action occurred: %, at %',TG_OP,now();
RETURN NULL;
END IF;
EXCEPTION
WHEN data_exception THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [DATA EXCEPTION] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN unique_violation THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [UNIQUE] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
WHEN OTHERS THEN
RAISE WARNING '[AUDIT.IF_MODIFIED_FUNC] - UDF ERROR [OTHER] - SQLSTATE: %, SQLERRM: %',SQLSTATE,SQLERRM;
RETURN NULL;
END;
CREATE TRIGGER auditoria_clientes
AFTER INSERT OR DELETE OR UPDATE
ON public.clientes
FOR EACH ROW
EXECUTE PROCEDURE public.auditoria_clientes();
Added the create trigger code.
Table "public.clientes"
Column | Type | Modifiers
----------------------+-----------------------------+----------------------------------------------------------------
clnt_codigo | integer | not null default nextval('clientes_clnt_codigo_seq'::regclass)
clnt_primeinome | character varying(50) |
clnt_ultimonome | character varying(50) |
clnt_genero | character varying(15) |
clnt_tp_pele | character varying(50) |
clnt_dtnasc | date |
clnt_telefone | character varying(50) |
clnt_email | character varying(100) |
clnt_conhecto | character varying(50) |
clnt_obs | character varying(1000) |
clnt_status | character varying(50) |
clnt_timestamp | timestamp without time zone |
clnt_autorstat | character varying(50) |
clnt_morada | character varying(200) |
clnt_codpostal | character varying(8) |
clnt_sms | boolean | default false
clnt_generico | boolean | default false
clnt_mes | integer | default 0
clnt_tipo | character varying(50) |
clnt_lojahabitual | integer | default 0
clnt_spa | boolean | default false
clnt_telefone2 | character varying(50) |
clnt_dtcriacao | date |
clnt_timestampaceita | timestamp without time zone |
Indexes:
"CLIENTES_pkey" PRIMARY KEY, btree (clnt_codigo)
"WDIDX_CLIENTES_CLNT_DTNASC" btree (clnt_dtnasc)
"WDIDX_CLIENTES_CLNT_EMAIL" btree (clnt_email)
"WDIDX_CLIENTES_CLNT_GENERICO" btree (clnt_generico)
"WDIDX_CLIENTES_CLNT_PRIMEINOME" btree (clnt_primeinome)
"WDIDX_CLIENTES_CLNT_TELEFONE" btree (clnt_telefone)
"WDIDX_CLIENTES_CLNT_ULTIMONOME" btree (clnt_ultimonome)
"fki_codpostal" btree (clnt_codpostal)
Triggers:
auditoria_clientes AFTER INSERT OR DELETE OR UPDATE ON clientes FOR EACH ROW EXECUTE PROCEDURE auditoria_clientes()
Added the table description like asked in the comments.
postgresql database-trigger
postgresql database-trigger
edited Mar 7 at 16:15
José Costa
asked Mar 7 at 15:27
José CostaJosé Costa
11
11
That's the trigger function. Please edit your question and add the correspondingcreate trigger
statement.
– a_horse_with_no_name
Mar 7 at 15:36
Also, are there any other triggers on the table? Ideal would be the output ofd
for the table inpsql
.
– Laurenz Albe
Mar 7 at 15:42
@a_horse_with_no_name i added in the main post the create trigger code.
– José Costa
Mar 7 at 15:57
@LaurenzAlbe there are not any other triggers on the table.
– José Costa
Mar 7 at 15:57
Do you get an exception if you remove theEXCEPTION
clauses?
– Laurenz Albe
Mar 7 at 16:01
|
show 4 more comments
That's the trigger function. Please edit your question and add the correspondingcreate trigger
statement.
– a_horse_with_no_name
Mar 7 at 15:36
Also, are there any other triggers on the table? Ideal would be the output ofd
for the table inpsql
.
– Laurenz Albe
Mar 7 at 15:42
@a_horse_with_no_name i added in the main post the create trigger code.
– José Costa
Mar 7 at 15:57
@LaurenzAlbe there are not any other triggers on the table.
– José Costa
Mar 7 at 15:57
Do you get an exception if you remove theEXCEPTION
clauses?
– Laurenz Albe
Mar 7 at 16:01
That's the trigger function. Please edit your question and add the corresponding
create trigger
statement.– a_horse_with_no_name
Mar 7 at 15:36
That's the trigger function. Please edit your question and add the corresponding
create trigger
statement.– a_horse_with_no_name
Mar 7 at 15:36
Also, are there any other triggers on the table? Ideal would be the output of
d
for the table in psql
.– Laurenz Albe
Mar 7 at 15:42
Also, are there any other triggers on the table? Ideal would be the output of
d
for the table in psql
.– Laurenz Albe
Mar 7 at 15:42
@a_horse_with_no_name i added in the main post the create trigger code.
– José Costa
Mar 7 at 15:57
@a_horse_with_no_name i added in the main post the create trigger code.
– José Costa
Mar 7 at 15:57
@LaurenzAlbe there are not any other triggers on the table.
– José Costa
Mar 7 at 15:57
@LaurenzAlbe there are not any other triggers on the table.
– José Costa
Mar 7 at 15:57
Do you get an exception if you remove the
EXCEPTION
clauses?– Laurenz Albe
Mar 7 at 16:01
Do you get an exception if you remove the
EXCEPTION
clauses?– Laurenz Albe
Mar 7 at 16:01
|
show 4 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047351%2fpostgres-after-delete-trigger-does-not-fire%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047351%2fpostgres-after-delete-trigger-does-not-fire%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
That's the trigger function. Please edit your question and add the corresponding
create trigger
statement.– a_horse_with_no_name
Mar 7 at 15:36
Also, are there any other triggers on the table? Ideal would be the output of
d
for the table inpsql
.– Laurenz Albe
Mar 7 at 15:42
@a_horse_with_no_name i added in the main post the create trigger code.
– José Costa
Mar 7 at 15:57
@LaurenzAlbe there are not any other triggers on the table.
– José Costa
Mar 7 at 15:57
Do you get an exception if you remove the
EXCEPTION
clauses?– Laurenz Albe
Mar 7 at 16:01