dbTalk Databases Forums  

Names of Constraint Triggers

comp.databases.postgresql comp.databases.postgresql


Discuss Names of Constraint Triggers in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Guettler
 
Posts: n/a

Default Names of Constraint Triggers - 10-09-2008 , 08:59 AM






Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?

foo_foo_mwtest=# create constraint trigger hist_trigger after insert or update or delete on foo_historytransaction
DEFERRABLE INITIALLY DEFERRED for each row execute procedure do_raise();
CREATE TRIGGER

foo_foo_mwtest=# \d foo_historytransaction
Tabelle »public.foo_historytransaction«
Spalte | Typ | Attribute
--------------+--------------------------+-------------------------------------------------------------------------
id | integer | not null default nextval('foo_historytransaction_id_seq'::regclass)
date | timestamp with time zone | not null
changedby_id | integer | not null
Indexe:
»foo_historytransaction_pkey« PRIMARY KEY, btree (id)
»foo_historytransaction_changedby_id« btree (changedby_id)
Fremdschlüssel-Constraints:
»foo_historytransaction_changedby_id_fkey« FOREIGN KEY (changedby_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY
DEFERRED
Trigger:
"RI_ConstraintTrigger_53828" AFTER INSERT OR DELETE OR UPDATE ON foo_historytransaction DEFERRABLE INITIALLY
DEFERRED FOR EACH ROW EXECUTE PROCEDURE do_raise()

foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table »foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on foo_historytransaction;
DROP TRIGGER

foo_foo_mwtest=# select version();
PostgreSQL 8.2.6 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.2.1 (SUSE Linux)


--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

Reply With Quote
  #2  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM






Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #3  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #4  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #5  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #6  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #7  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #8  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
  #9  
Old   
Nico Latzer
 
Posts: n/a

Default Re: Names of Constraint Triggers - 10-09-2008 , 12:37 PM



Hi Thomas,

Thomas Guettler schrieb:
Quote:
Hi,

I had a problem, that I was unable to drop a constraint trigger.

1. Why do constraint trigger loose their name and get
RI_ConstrainTrigger_NNNN?
2. Why do you need the double quotes around "RI_ConstrainTrigger_..."?
the namespace is case-sensitive and unquoted names will be lowercased as
You already have discoverd.


....
Quote:
foo_foo_mwtest=# drop trigger RI_ConstraintTrigger_53828 on
foo_historytransaction;
ERROR: Trigger »ri_constrainttrigger_53828« for table
»foo_historytransaction« does not exist.

foo_foo_mwtest=# drop trigger "RI_ConstraintTrigger_53828" on
foo_historytransaction;
DROP TRIGGER

Regards,
Nico


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.