Thread: pgAdmin III No Trigger Functions available
pgAdmin III version 0.9.1 24th Aug 2003
I have several trigger functions listed in the tree view of the database under trigger functions.
When attempting to assign a trigger to a table event there are no trigger functions available in the drop down list and I cannot manually enter one.
Regards
Donald Fraser.
----- Original Message ----- From: "Andreas Pflug" <pgadmin@pse-consulting.de> To: "Donald Fraser" <demolish@cwgsy.net> Sent: Friday, August 29, 2003 11:36 PM Subject: Re: [pgadmin-support] pgAdmin III No Trigger Functions available > Donald Fraser wrote: > > > pgAdmin III version 0.9.1 24th Aug 2003 > > > > I have several trigger functions listed in the tree view of the > > database under trigger functions. > > > > When attempting to assign a trigger to a table event there are no > > trigger functions available in the drop down list and I cannot > > manually enter one. > > > Strange. What pgsql version are you running on? Will the combobox show PostgreSQL version 7.3.4 on Redhat, GCC 2.96 > the builtin functions (RI_FKey_check_ins etc) if you enable system objects? Yes - when I enable system objects I get all of the trigger functions available - system ones (RI_FKey_..) and my own. When it is not enalbed I get nothing. > SELECT proname FROM pg_proc WHERE prorettype=2279 is used to fill the > combobox. 2279 should be the oid of the "trigger" type. Check if this is > true for your procs. Executing the above query produces the exact list that appears in the combox box when I have system obejects enabled. Hope that helps? Regards Donald Fraser.
Donald Fraser wrote: > > >>the builtin functions (RI_FKey_check_ins etc) if you enable system objects? >> >> > >Yes - when I enable system objects I get all of the trigger functions >available - system ones (RI_FKey_..) and my own. >When it is not enalbed I get nothing. > > > >>SELECT proname FROM pg_proc WHERE prorettype=2279 is used to fill the >>combobox. 2279 should be the oid of the "trigger" type. Check if this is >>true for your procs. >> >> > >Executing the above query produces the exact list that appears in the combox >box when I have system obejects enabled. > > So your obviously functions are recognized as system trigger functions. SELECT c.oid, c.relname , nspname FROM pg_class c JOIN pg_namespace n ON n.oid=c.relnamespaceWHERE relkind='r' AND (n.oid= 2200 OR n.oid >= 17137) AND n.nspname NOT LIKE 'pg\_temp\_%'ORDER BY relnamespace, c.relname is the query to retrieve non-system trigger functions. 2200 is public's oid, and 17137 is the last system oid on my system, might be different for yours. Please check which restriction doesn't fit. Regards, Andreas
----- Original Message ----- Subject: Re: [pgadmin-support] pgAdmin III No Trigger Functions available > Donald Fraser wrote: > > > > > > >>the builtin functions (RI_FKey_check_ins etc) if you enable system objects? > >> > >> > > > >Yes - when I enable system objects I get all of the trigger functions > >available - system ones (RI_FKey_..) and my own. > >When it is not enalbed I get nothing. > > > > > > > >>SELECT proname FROM pg_proc WHERE prorettype=2279 is used to fill the > >>combobox. 2279 should be the oid of the "trigger" type. Check if this is > >>true for your procs. > >> > >> > > > >Executing the above query produces the exact list that appears in the combox > >box when I have system obejects enabled. > > > > > So your obviously functions are recognized as system trigger functions. > > SELECT c.oid, c.relname , nspname > FROM pg_class c > JOIN pg_namespace n ON n.oid=c.relnamespace > WHERE relkind='r' > AND (n.oid = 2200 OR n.oid >= 17137) > AND n.nspname NOT LIKE 'pg\_temp\_%' > ORDER BY relnamespace, c.relname > > is the query to retrieve non-system trigger functions. 2200 is public's > oid, and 17137 is the last system oid on my system, might be different > for yours. Please check which restriction doesn't fit. I adjusted it for the last system oid (16974) on my system and ran it. The result set was simply all of the table objects in my database. No trigger functions or any other kind of object. Regards Donald
Donald Fraser wrote: >----- Original Message ----- >Subject: Re: [pgadmin-support] pgAdmin III No Trigger Functions available > > > > >>Donald Fraser wrote: >> >> >> >>> >>> >>>>the builtin functions (RI_FKey_check_ins etc) if you enable system objects? >>>> >>>> >>>> >>>> >>>Yes - when I enable system objects I get all of the trigger functions >>>available - system ones (RI_FKey_..) and my own. >>>When it is not enalbed I get nothing. >>> >>> >>> >>> >>> >>>>SELECT proname FROM pg_proc WHERE prorettype=2279 is used to fill the >>>>combobox. 2279 should be the oid of the "trigger" type. Check if this is >>>>true for your procs. >>>> >>>> >>>> >>>> >>>Executing the above query produces the exact list that appears in the combox >>>box when I have system obejects enabled. >>> >>> >>> >>> >>So your obviously functions are recognized as system trigger functions. >> >>SELECT c.oid, c.relname , nspname >> FROM pg_class c >> JOIN pg_namespace n ON n.oid=c.relnamespace >> WHERE relkind='r' >> AND (n.oid = 2200 OR n.oid >= 17137) >> AND n.nspname NOT LIKE 'pg\_temp\_%' >> ORDER BY relnamespace, c.relname >> >>is the query to retrieve non-system trigger functions. 2200 is public's >>oid, and 17137 is the last system oid on my system, might be different >>for yours. Please check which restriction doesn't fit. >> >> > >I adjusted it for the last system oid (16974) on my system and ran it. >The result set was simply all of the table objects in my database. No trigger >functions or any other kind of object. > > > Umpf, was the wrong entry. Anyway, I found the problem, the public namespace wasn't included for the combobox. I commited an update to dlgTrigger.cpp. Regards, Andreas