473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Raising a Debug Message while insertion in Functions.

Hi,
I am trying to generate a message in function through RAISE NOTICE or RAISE DEBUG. Function runs fine but i can not see the out put message.


Expand|Select|Wrap|Line Numbers
  1. -- Function: actacladd(text, integer, integer, text, text, text, text)
  2.  
  3. -- DROP FUNCTION actacladd(text, integer, integer, text, text, text, text);
  4.  
  5. CREATE OR REPLACE FUNCTION actacladd(text, integer, integer, text, text, text, text)
  6.   RETURNS integer AS
  7. $BODY$
  8. declare
  9. v_sesid ALIAS for $1;
  10. v_actno ALIAS for $2;
  11. v_subsno ALIAS for $3;
  12. v_attr ALIAS for $4;
  13. v_value ALIAS for $5;
  14. v_value1 ALIAS for $6;
  15. v_devid ALIAS for $7;
  16. v_domno int;
  17. v_action text;
  18. v_temp int;
  19. v_aclno int;
  20. begin
  21.  
  22. --RAISE NOTICE 'The Input Parameters are at and % ', current_date;
  23. --        OR
  24. RAISE DEBUG 'The actacladd() function began.';
  25. if length(v_attr)=0 or length(v_devid)=0 or length(v_value)=0 or (v_attr='UPWD' and length(v_value1)=0) then
  26.   raise exception 'All values are mandatory';
  27.   return 0;
  28. end if;
  29. if v_attr = 'IPADDR' then
  30.  
  31.  select into v_domno domno from account where actno=v_actno;
  32.  if exists(select * from actacl c,account a where c.actno=a.actno and a.domno=v_domno and c.attr='IPADDR' and c.value=v_value and c.status=0) then
  33.   raise exception 'IP Address belong to another open subscription';
  34.   return 0;
  35.  end if;
  36. else
  37.  
  38.  if exists(select * from actacl where attr=v_attr and upper(value)=upper(v_value) and status=0) then
  39.   raise exception 'ACL value belong to anothre open subscription';
  40.   return 0; 
  41.  end if;
  42. end if;
  43. if v_attr = 'IPADDR' or v_attr = 'MACADDR'then
  44.  
  45.  RAISE NOTICE 'IPADDR or MACADDR if condition';
  46.  if exists(select * from actacl where subsno=v_subsno and upper(devid)=upper(v_devid) and attr=v_attr and status=0 for update) then
  47.   raise exception 'One device cannot have more than one IP/MAC';
  48.   return 0;
  49.  end if;
  50. end if;
  51. RAISE NOTICE 'OutSide of Insert Statement for ACTACL';
  52. insert into actacl(actno,subsno,svccat,attr,value,status,value1,devid)
  53.  values (v_actno,v_subsno,1,v_attr,trim(v_value),0,trim(v_value1),v_devid);
  54.  
  55. v_action:='NetID Added: '||v_value;
  56. select into v_aclno currval('actacl_aclno_seq');
  57. v_temp=writeactlog(v_actno,v_sesid,v_action,cast(v_aclno as character varying));
  58.  
  59. return 1;
  60.  
  61. end;
  62. $BODY$
  63.   LANGUAGE plpgsql VOLATILE;
  64. ALTER FUNCTION actacladd(text, integer, integer, text, text, text, text) OWNER TO radius;
  65.  
Oct 5 '10 #1
1 1966
rski
700 Expert 512MB
What is the logging level on the client side (what is a value of client_min_messages parameter).
Oct 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Winston WOLFF | last post by:
What do people think about changing the parameters to logging.debug() to be more like the parameters to print? As you know, you can pass multiple parameters to print, and they are all printed out...
11
by: Markus Dehmann | last post by:
I have a static const bool debug = false; variable in my class. Debug output goes like this, trivially: if(debug) cerr << "debug message"; Is it guaranteed that this if/then clause is always...
2
by: Axel Dahmen | last post by:
Hi, when applying changes to the code and hitting to debug, a MessageBox pops up asking me if I want to build before debugging. Of course I want, that's why I've changed the code... Is there a...
10
by: Serg | last post by:
Every time i am trying to step into virtual funtion debugger tells me "there is no source code available" and disassemble window appears. If function is non virtual debugger succefully steps into...
8
by: Mihajlo Cvetanović | last post by:
My application crashed (with the "cannot read memory, press OK to terminate or Cancel to debug" message) on the machine that has VC7.1. I just copied the original project with pdb file to that...
4
by: KC | last post by:
Hi, I don't know why this question is so hard to have an answer ? I search Google for a while ... and can't find any "good" answer. Using "throw new Error(msg)" does work ... but I believe...
0
by: ziyanjoe | last post by:
Hi! I am writing a program for the robot that runs as a daemon on a linux machine. Since debug output cannot be seen on stdout, I want to create an iostream to handle all the output messages....
2
by: mthread | last post by:
Hi, I am new to C++, But has good experience in C. In C I have used macros to enable / disable debug statements in the code. For ex : #if defined ENABLE_DEBUG #define Printf1(arg) printf(arg)...
4
by: thomas | last post by:
template <class T> class BufferQueue{ public: int BufferQueue<T>::pushToQueue(T pkt, int timeout); } template<class T> int BufferQueue<T>::pushToQueue(T pkt, ACE_Time_Value *timeout){...
1
by: lchomany | last post by:
Can anyone tell me what the compiled error would be here? Saying "User-defined type not found" and highlighted objWord As Word.Document in yellow ______________________________ Private Sub...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.