Re: Automatically updating a new information column in PostgreSQL

Pepe TD Vo <[email protected]> Fri, 4 Oct 2019 15:53:32 +0000 (UTC)
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <[email protected]>
------=_Part_2395305_1754697543.1570204412032
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

1st I had both "return new" in the exception and main part. When I run inse=
rt and it is still not working and when I remove it from main part, the res=
ult is the same.=C2=A0=C2=A0
an expert from reddit test the script out and he informed me that the scrip=
t worked fine.=C2=A0 I have test in the linux box and it worked fine too bu=
t do not understand why it's not working in AWS unclassified environment.
I found out that in AWS is case sensitive and recreated table with lower ca=
se and voila, all worked.=C2=A0
thank you so much for looking into script and corrected my work.
have a good weekend.
Bach-Nga

No one in this world is pure and perfect.=C2=A0 If you avoid people for the=
ir mistakes you will be alone. So judge less, love and forgive more.To call=
 him a dog hardly seems to do him justice though in as much as he had four =
legs, a tail, and barked, I admit he was, to all outward appearances. But t=
o those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely =
rich *** Faithful talent *** Sharing success=20

    On Friday, October 4, 2019, 09:49:33 AM EDT, Voillequin, Jean-Marc <Jea=
[email protected]> wrote: =20
=20
 #yiv0934717431 #yiv0934717431 -- _filtered #yiv0934717431 {font-family:Win=
gdings;panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #yiv0934717431 {panose-1:2 =
4 5 3 5 4 6 3 2 4;} _filtered #yiv0934717431 {font-family:Calibri;panose-1:=
2 15 5 2 2 2 4 3 2 4;} _filtered #yiv0934717431 {font-family:Verdana;panose=
-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv0934717431 {font-family:inherit;pan=
ose-1:0 0 0 0 0 0 0 0 0 0;}#yiv0934717431 #yiv0934717431 p.yiv0934717431Mso=
Normal, #yiv0934717431 li.yiv0934717431MsoNormal, #yiv0934717431 div.yiv093=
4717431MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-fa=
mily:sans-serif;}#yiv0934717431 a:link, #yiv0934717431 span.yiv0934717431Ms=
oHyperlink {color:#0563C1;text-decoration:underline;}#yiv0934717431 a:visit=
ed, #yiv0934717431 span.yiv0934717431MsoHyperlinkFollowed {color:#954F72;te=
xt-decoration:underline;}#yiv0934717431 p.yiv0934717431msonormal0, #yiv0934=
717431 li.yiv0934717431msonormal0, #yiv0934717431 div.yiv0934717431msonorma=
l0 {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-seri=
f;}#yiv0934717431 p.yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm, #yiv093=
4717431 li.yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm, #yiv0934717431 d=
iv.yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm {margin-right:0in;margin-=
left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv0934717431 span.yiv09=
34717431ydp3b190d25yiv3811552299sg {}#yiv0934717431 span.yiv0934717431Email=
Style22 {font-family:sans-serif;color:windowtext;}#yiv0934717431 .yiv093471=
7431MsoChpDefault {font-size:10.0pt;} _filtered #yiv0934717431 {margin:70.8=
5pt 70.85pt 70.85pt 70.85pt;}#yiv0934717431 div.yiv0934717431WordSection1 {=
}#yiv0934717431 _filtered #yiv0934717431 {} _filtered #yiv0934717431 {font-=
family:Wingdings;} _filtered #yiv0934717431 {} _filtered #yiv0934717431 {fo=
nt-family:Wingdings;} _filtered #yiv0934717431 {font-family:Symbol;} _filte=
red #yiv0934717431 {} _filtered #yiv0934717431 {font-family:Wingdings;} _fi=
ltered #yiv0934717431 {font-family:Symbol;} _filtered #yiv0934717431 {} _fi=
ltered #yiv0934717431 {font-family:Wingdings;}#yiv0934717431 ol {margin-bot=
tom:0in;}#yiv0934717431 ul {margin-bottom:0in;}#yiv0934717431=20
Hello,
=20
 =C2=A0
=20
The function has a =E2=80=9Creturn new;=E2=80=9D in the exception part, not=
 in the main part.
=20
A return new is probably missing after the end if;
=20
 =C2=A0
=20
CREATE OR REPLACE FUNCTION "ECISDRDM"."TRIGGER_FCT_TR_STG_APPLICATION_CDIM_=
INS"()=C2=A0=C2=A0RETURNS trigger=C2=A0AS $$
=20
declare
=20
v_ErrorCode int;
v_ErrorMsg varchar(512);
v_Module varchar(32) :=3D 'TR_STG_APPLICATION_CDIM_INS';
=20
begin
=20
----
=20
-- If this is an INSERT operation
=20
----
=20
if TG_OP =3D 'INSERT' then
=20
=C2=A0 =C2=A0----
=C2=A0 =C2=A0-- This just ensures that the filename is not null
=C2=A0 =C2=A0----
=20
=C2=A0 =C2=A0if new.mig_filename IS NULL then
=C2=A0 =C2=A0 =C2=A0 new.mig_filename :=3D 'Unknown';
=C2=A0 =C2=A0end if;
=20
=C2=A0 =C2=A0new.mig_insert_dt =3D current_timestamp;
=20
end if;
=20
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D HERE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
return new;
=20
----
-- Exception error handler
----
=20
=C2=A0 =C2=A0exception
=C2=A0 =C2=A0 =C2=A0 when others then
=20
=C2=A0 =C2=A0 =C2=A0 v_ErrorCode :=3D SQLSTATE;
=C2=A0 =C2=A0 =C2=A0 v_ErrorMsg :=3D SQLERRM;
=20
=C2=A0 =C2=A0 =C2=A0 insert into "ECISDRDM"."ERRORLOG"( "TSTAMP", "OS_USER"=
, "HOST", "MODULE", "ERRORCODE",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0"ERRORMSG")
=C2=A0 =C2=A0 =C2=A0 values (CURRENT_TIMESTAMP, CURRENT_USER, inet_server_a=
ddr(), v_Module, v_ErrorCode, v_ErrorMsg);
=20
RETURN NEW;
end;
$$
language 'plpgsql';
=20
 =C2=A0
=20
From: Pepe TD Vo <[email protected]>=20
Sent: Friday, October 4, 2019 3:27 PM
To: Pgsql-admin <[email protected]>; [email protected]
Subject: Automatically updating a new information column in PostgreSQL
=20
 =C2=A0
=20
=C2=A0
=20
CAUTION: This email originated from outside of Moody's. Do not click links =
or open attachments unless you recognize the sender and know the content is=
 safe.
=20
=C2=A0
=20

good morning experts,
=20
I have a trigger before insert (even with or update) and seem it doesnt' wo=
rk.=C2=A0 The function simply sets both columns named mig_filename to "unkn=
own if its null, and mig_insert_dt to current timestample for each row pass=
ed to the trigger.
=20
 =C2=A0
=20
here is my script even I take all the rest out and just simple function wit=
h new.mig_insert_dt :=3D localtimestamp;
=20
 =C2=A0
=20
 =C2=A0
=20
 =C2=A0
=20
CREATE OR REPLACE FUNCTION "ECISDRDM"."TRIGGER_FCT_TR_STG_APPLICATION_CDIM_=
INS"()=C2=A0=C2=A0RETURNS trigger=C2=A0AS $$
=20
declare
=20
v_ErrorCode int;
v_ErrorMsg varchar(512);
v_Module varchar(32) :=3D 'TR_STG_APPLICATION_CDIM_INS';
=20
begin
=20
----
=20
-- If this is an INSERT operation
=20
----
=20
if TG_OP =3D 'INSERT' then
=20
=C2=A0 =C2=A0----
=C2=A0 =C2=A0-- This just ensures that the filename is not null
=C2=A0 =C2=A0----
=20
=C2=A0 =C2=A0if new.mig_filename IS NULL then
=C2=A0 =C2=A0 =C2=A0 new.mig_filename :=3D 'Unknown';
=C2=A0 =C2=A0end if;
=20
=C2=A0 =C2=A0new.mig_insert_dt =3D current_timestamp;
=20
end if;
=20
----
-- Exception error handler
----
=20
=C2=A0 =C2=A0exception
=C2=A0 =C2=A0 =C2=A0 when others then
=20
=C2=A0 =C2=A0 =C2=A0 v_ErrorCode :=3D SQLSTATE;
=C2=A0 =C2=A0 =C2=A0 v_ErrorMsg :=3D SQLERRM;
=20
=C2=A0 =C2=A0 =C2=A0 insert into "ECISDRDM"."ERRORLOG"( "TSTAMP", "OS_USER"=
, "HOST", "MODULE", "ERRORCODE",=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0"ERRORMSG")
=C2=A0 =C2=A0 =C2=A0 values (CURRENT_TIMESTAMP, CURRENT_USER, inet_server_a=
ddr(), v_Module, v_ErrorCode, v_ErrorMsg);
=20
RETURN NEW;
end;
$$
language 'plpgsql';
=20
CREATE TRIGGER "TR_STG_APPLICATION_CDIM_INS" BEFORE INSERT OR UPDATE ON "EC=
ISDRDM"."STG_APPLICATION_CDIM" FOR EACH ROW EXECUTE PROCEDURE "ECISDRDM"."T=
RIGGER_FCT_TR_STG_APPLICATION_CDIM_INS"() ;
=20

I even " RAISE EXCEPTION 'UNKNOWN'; " and for the mig_insert_dt, I put eith=
er '=3D' or ':=3D' Now(), now(), localtimestamp, timestamp, and none of the=
m would fill the time. Both mig.filename and mig_insert_dt are still blank.
=20
"
=20

if new.mig_filename IS NULL then=C2=A0
=20
=C2=A0 =C2=A0 RAISE EXCEPTION 'UNKNOWN';
=20
=C2=A0 =C2=A0 new.mig_filename :=3D 'Unknown';
=20
end if;
=20
new.mig_insert_dt '=3D now();=C2=A0 =C2=A0
=20

 =C2=A0
=20
According to the postgres example 39-3 "shows an example of trigger procedu=
re in PL/pgSQL", I don't see any different with the example and don't know =
what I have missed here.=C2=A0 Would you please advise what I did wrong her=
e?=C2=A0=C2=A0
=20
 =C2=A0
=20
thank you,
=20
 =C2=A0
=20
Bach-Nga

No one in this world is pure and perfect.=C2=A0 If you avoid people for the=
ir mistakes you will be alone. So judge less, love and forgive more.
=20
To call him a dog hardly seems to do him justice though in as much as he ha=
d four legs, a tail, and barked, I admit he was, to all outward appearances=
. But to those who knew him well, he was a perfect gentleman (Hermione Ging=
old)
=20

**Live simply **Love generously **Care deeply **Speak kindly.
=20
*** Genuinely rich *** Faithful talent *** Sharing success


 -----------------------------------------Moody's monitors email communicat=
ions through its networks for regulatory compliance purposes and to protect=
 its customers, employees and business and where allowed to do so by applic=
able law. The information contained in this e-mail message, and any attachm=
ent thereto, is confidential and may not be disclosed without our express p=
ermission. If you are not the intended recipient or an employee or agent re=
sponsible for delivering this message to the intended recipient, you are he=
reby notified that you have received this message in error and that any rev=
iew, dissemination, distribution or copying of this message, or any attachm=
ent thereto, in whole or in part, is strictly prohibited. If you have recei=
ved this message in error, please immediately notify us by telephone, fax o=
r e-mail and delete the message and all of its attachments. Every effort is=
 made to keep our network free from viruses. You should, however, review th=
is e-mail message, as well as any attachment thereto, for viruses. We take =
no responsibility and have no liability for any computer virus which may be=
 transferred via this e-mail message.=20

This email was sent to you by Moody=E2=80=99s Investors Service EMEA Limite=
d
Registered office address:
One Canada Square
Canary Wharf
London, E14 5FA
Registered in England and Wales No: 8922701--------------------------------=
--------- =20
------=_Part_2395305_1754697543.1570204412032
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div class=3D"ydp199dacb0yahoo-style-wrap" style=
=3D"font-family:verdana, helvetica, sans-serif;font-size:16px;"><div><div d=
ir=3D"ltr" data-setdir=3D"false">1st I had both "return new" in the excepti=
on and main part. When I run insert and it is still not working and when I =
remove it from main part, the result is the same.&nbsp;&nbsp;</div><div dir=
=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"fa=
lse">an expert from reddit test the script out and he informed me that the =
script worked fine.&nbsp; I have test in the linux box and it worked fine t=
oo but do not understand why it's not working in AWS unclassified environme=
nt.</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" =
data-setdir=3D"false">I found out that in AWS is case sensitive and recreat=
ed table with lower case and voila, all worked.&nbsp;</div><div dir=3D"ltr"=
 data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">tha=
nk you so much for looking into script and corrected my work.</div><div dir=
=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"fa=
lse">have a good weekend.</div><div><br></div><div class=3D"ydp199dacb0sign=
ature"><div id=3D"ydp199dacb0yui_3_13_0_rc_1_1_1381789421038_7868" class=3D=
"ydp199dacb0yiv3811552299ms__id13889"><font color=3D"#0000ff"><b><span clas=
s=3D"ydp199dacb0yiv3811552299sg"><font color=3D"#8000ff" style=3D"backgroun=
d-color: inherit;"></font></span></b></font><div id=3D"ydp199dacb0yui_3_13_=
0_rc_1_1_1381789421038_7874" class=3D"ydp199dacb0yiv3811552299ms__id13893">=
<font id=3D"ydp199dacb0yui_3_13_0_rc_1_1_1381789421038_7873" color=3D"#0000=
ff"><font color=3D"#8000ff"></font><span id=3D"ydp199dacb0yui_3_13_0_rc_1_1=
_1381789421038_7871" class=3D"ydp199dacb0yiv3811552299sg"><font id=3D"ydp19=
9dacb0yui_3_13_0_rc_1_1_1381789421038_7870" color=3D"#8000ff" style=3D"back=
ground-color: inherit;"><b id=3D"ydp199dacb0yui_3_13_0_rc_1_16_138178942103=
8_18">Bach-Nga<br clear=3D"none"><br clear=3D"none"></b>No one in this worl=
d is pure and perfect.&nbsp; If you avoid people for their mistakes you wil=
l be alone. So judge less, love and forgive more.</font></span></font></div=
><div id=3D"ydp199dacb0yui_3_13_0_rc_1_1_1381789421038_7874" class=3D"ydp19=
9dacb0yiv3811552299ms__id13893"><font color=3D"#0000ff"><span class=3D"ydp1=
99dacb0yiv3811552299sg"><font color=3D"#8000ff" style=3D"background-color: =
inherit;">To call him a dog hardly seems to do him justice though in as muc=
h as he had four legs, a tail, and barked, I admit he was, to all outward a=
ppearances. But to those who knew him well, he was a perfect gentleman (Her=
mione Gingold)</font></span></font></div><br clear=3D"none"><span style=3D"=
color:rgb(128, 0, 255);" id=3D"ydp199dacb0yui_3_13_0_rc_1_1_1381789421038_7=
867">**Live simply **Love generously **Care deeply **Speak kindly.</span></=
div><div id=3D"ydp199dacb0yui_3_13_0_rc_1_1_1381789421038_7866" class=3D"yd=
p199dacb0yiv3811552299ms__id13894"><span id=3D"ydp199dacb0yui_3_13_0_rc_1_1=
_1381789421038_7865" class=3D"ydp199dacb0yiv3811552299sg"><font id=3D"ydp19=
9dacb0yui_3_13_0_rc_1_1_1381789421038_7864" color=3D"#8000ff" style=3D"back=
ground-color: inherit;">*** Genuinely rich *** Faithful talent *** Sharing =
success</font></span></div></div></div>
        <div><br></div><div><br></div>
       =20
        </div><div id=3D"yahoo_quoted_1184915822" class=3D"yahoo_quoted">
            <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
               =20
                <div>
                    On Friday, October 4, 2019, 09:49:33 AM EDT, Voillequin=
, Jean-Marc &lt;[email protected]&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id=3D"yiv0934717431"><style>#yiv0934717431 #yiv09=
34717431 --
=20
 _filtered #yiv0934717431 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0=
 0;}
 _filtered #yiv0934717431 {panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered #yiv0934717431 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 =
4;}
 _filtered #yiv0934717431 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 =
4;}
 _filtered #yiv0934717431 {font-family:inherit;panose-1:0 0 0 0 0 0 0 0 0 0=
;}
#yiv0934717431 =20
#yiv0934717431 p.yiv0934717431MsoNormal, #yiv0934717431 li.yiv0934717431Mso=
Normal, #yiv0934717431 div.yiv0934717431MsoNormal
=09{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-seri=
f;}
#yiv0934717431 a:link, #yiv0934717431 span.yiv0934717431MsoHyperlink
=09{color:#0563C1;text-decoration:underline;}
#yiv0934717431 a:visited, #yiv0934717431 span.yiv0934717431MsoHyperlinkFoll=
owed
=09{color:#954F72;text-decoration:underline;}
#yiv0934717431 p.yiv0934717431msonormal0, #yiv0934717431 li.yiv0934717431ms=
onormal0, #yiv0934717431 div.yiv0934717431msonormal0
=09{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-seri=
f;}
#yiv0934717431 p.yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm, #yiv093471=
7431 li.yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm, #yiv0934717431 div.=
yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm
=09{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-seri=
f;}
#yiv0934717431 span.yiv0934717431ydp3b190d25yiv3811552299sg
=09{}
#yiv0934717431 span.yiv0934717431EmailStyle22
=09{font-family:sans-serif;color:windowtext;}
#yiv0934717431 .yiv0934717431MsoChpDefault
=09{font-size:10.0pt;}
 _filtered #yiv0934717431 {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
#yiv0934717431 div.yiv0934717431WordSection1
=09{}
#yiv0934717431 =20
 _filtered #yiv0934717431 {}
 _filtered #yiv0934717431 {font-family:Wingdings;}
 _filtered #yiv0934717431 {}
 _filtered #yiv0934717431 {font-family:Wingdings;}
 _filtered #yiv0934717431 {font-family:Symbol;}
 _filtered #yiv0934717431 {}
 _filtered #yiv0934717431 {font-family:Wingdings;}
 _filtered #yiv0934717431 {font-family:Symbol;}
 _filtered #yiv0934717431 {}
 _filtered #yiv0934717431 {font-family:Wingdings;}
#yiv0934717431 ol
=09{margin-bottom:0in;}
#yiv0934717431 ul
=09{margin-bottom:0in;}
#yiv0934717431 </style><div>
<div class=3D"yiv0934717431WordSection1">
<p class=3D"yiv0934717431MsoNormal">Hello,</p>=20
<p class=3D"yiv0934717431MsoNormal"> &nbsp;</p>=20
<p class=3D"yiv0934717431MsoNormal">The function has a =E2=80=9Creturn new;=
=E2=80=9D in the exception part, not in the main part.</p>=20
<p class=3D"yiv0934717431MsoNormal">A return new is probably missing after =
the end if;</p>=20
<p class=3D"yiv0934717431MsoNormal"> &nbsp;</p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">CREATE OR REPLACE FUNCTION "ECISDRDM"."TRIGGE=
R_FCT_TR_STG_APPLICATION_CDIM_INS"()&nbsp;&nbsp;RETURNS trigger&nbsp;AS $$<=
/span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">declare</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">v_ErrorCode int;<br clear=3D"none">
v_ErrorMsg varchar(512);<br clear=3D"none">
v_Module varchar(32) :=3D 'TR_STG_APPLICATION_CDIM_INS';</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">begin</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">----</span></p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">-- If this is an INSERT operation</span><span=
 style=3D"font-size:10.5pt;"></span></p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">----</span><span style=3D"font-size:10.5pt;">=
</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">if TG_OP =3D 'INSERT' then</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;----<br clear=3D"none">
&nbsp; &nbsp;-- This just ensures that the filename is not null<br clear=3D=
"none">
&nbsp; &nbsp;----</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;if new.mig_filename IS NULL =
then<br clear=3D"none">
&nbsp; &nbsp; &nbsp; new.mig_filename :=3D 'Unknown';<br clear=3D"none">
&nbsp; &nbsp;end if;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;new.mig_insert_dt =3D curren=
t_timestamp;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">end if;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;">
<span style=3D"font-size:10.5pt;">/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 HERE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D*/</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;">
<span style=3D"font-size:10.5pt;">return new;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;">
<span style=3D"font-size:10.5pt;">----<br clear=3D"none">
-- Exception error handler<br clear=3D"none">
----</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;exception<br clear=3D"none">
&nbsp; &nbsp; &nbsp; when others then</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp; &nbsp; v_ErrorCode :=3D SQL=
STATE;<br clear=3D"none">
&nbsp; &nbsp; &nbsp; v_ErrorMsg :=3D SQLERRM;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp; &nbsp; insert into "ECISDRD=
M"."ERRORLOG"( "TSTAMP", "OS_USER", "HOST", "MODULE", "ERRORCODE",&nbsp; &n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"ERRORMSG")<br clear=3D"none"=
>
&nbsp; &nbsp; &nbsp; values (CURRENT_TIMESTAMP, CURRENT_USER, inet_server_a=
ddr(), v_Module, v_ErrorCode, v_ErrorMsg);</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">RETURN NEW;<br clear=3D"none">
end;<br clear=3D"none">
$$<br clear=3D"none">
language 'plpgsql';</span></p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"font-style:inherit;font-weight=
:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;">
 &nbsp;</p>=20
<div class=3D"yiv0934717431yqt3618414920" id=3D"yiv0934717431yqt86585"><div=
>
<div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in =
0in 0in;">
<p class=3D"yiv0934717431MsoNormal"><b>From:</b> Pepe TD Vo &lt;pepevo@yaho=
o.com&gt; <br clear=3D"none">
<b>Sent:</b> Friday, October 4, 2019 3:27 PM<br clear=3D"none">
<b>To:</b> Pgsql-admin &lt;[email protected]&gt;; pgsql-sql@postgr=
esql.org<br clear=3D"none">
<b>Subject:</b> Automatically updating a new information column in PostgreS=
QL</p>=20
</div>
</div>
<p class=3D"yiv0934717431MsoNormal"> &nbsp;</p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"">&nbsp;</p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"line-height:12.0pt;background:=
#FFEB9C;">
<strong><span style=3D"font-size:10.0pt;">CAUTION:</span></strong><span sty=
le=3D"font-size:10.0pt;"> This email originated from outside of Moody's. Do=
 not click links or open attachments unless you recognize the sender
 and know the content is safe.</span></p>=20
<p class=3D"yiv0934717431MsoNormal" style=3D"">&nbsp;</p>=20
<div>
<div>
<div>
<blockquote style=3D"margin-left:6.0pt;margin-top:3.0pt;margin-right:0in;ma=
rgin-bottom:3.0pt;">
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:12.0pt;">good morning experts,</span><span style=3D"fo=
nt-size:10.5pt;"></span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:12.0pt;">I have a trigger before insert (even with or =
update) and seem it doesnt' work.&nbsp; The function simply sets both colum=
ns named mig_filename
 to "unknown if its null, and mig_insert_dt to current timestample for each=
 row passed to the trigger.</span><span style=3D"font-size:10.5pt;"></span>=
</p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;"> &nbsp;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:12.0pt;">here is my script even I take all the rest ou=
t and just simple function with new.mig_insert_dt :=3D localtimestamp;</spa=
n><span style=3D"font-size:10.5pt;"></span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;"> &nbsp;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;"> &nbsp;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;"> &nbsp;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">CREATE OR REPLACE FUNCTION "ECISDRDM"."TRIGGE=
R_FCT_TR_STG_APPLICATION_CDIM_INS"()&nbsp;&nbsp;RETURNS trigger&nbsp;AS $$<=
/span></p>=20
</div>
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">declare</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">v_ErrorCode int;<br clear=3D"none">
v_ErrorMsg varchar(512);<br clear=3D"none">
v_Module varchar(32) :=3D 'TR_STG_APPLICATION_CDIM_INS';</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">begin</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">----</span></p>=20
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">-- If this is an INSERT operation</span><span=
 style=3D"font-size:10.5pt;"></span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">----</span><span style=3D"font-size:10.5pt;">=
</span></p>=20
</div>
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">if TG_OP =3D 'INSERT' then</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;----<br clear=3D"none">
&nbsp; &nbsp;-- This just ensures that the filename is not null<br clear=3D=
"none">
&nbsp; &nbsp;----</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;if new.mig_filename IS NULL =
then<br clear=3D"none">
&nbsp; &nbsp; &nbsp; new.mig_filename :=3D 'Unknown';<br clear=3D"none">
&nbsp; &nbsp;end if;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;new.mig_insert_dt =3D curren=
t_timestamp;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">end if;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">----<br clear=3D"none">
-- Exception error handler<br clear=3D"none">
----</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp;exception<br clear=3D"none">
&nbsp; &nbsp; &nbsp; when others then</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp; &nbsp; v_ErrorCode :=3D SQL=
STATE;<br clear=3D"none">
&nbsp; &nbsp; &nbsp; v_ErrorMsg :=3D SQLERRM;</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">&nbsp; &nbsp; &nbsp; insert into "ECISDRD=
M"."ERRORLOG"( "TSTAMP", "OS_USER", "HOST", "MODULE", "ERRORCODE",&nbsp; &n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"ERRORMSG")<br clear=3D"none"=
>
&nbsp; &nbsp; &nbsp; values (CURRENT_TIMESTAMP, CURRENT_USER, inet_server_a=
ddr(), v_Module, v_ErrorCode, v_ErrorMsg);</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">RETURN NEW;<br clear=3D"none">
end;<br clear=3D"none">
$$<br clear=3D"none">
language 'plpgsql';</span></p>=20
<p class=3D"yiv0934717431ydpea5899c81qeiagb0cpwnlhdf9xsijm" style=3D"margin=
:0in;margin-bottom:.0001pt;vertical-align:baseline;font-style:inherit;font-=
weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;"=
>
<span style=3D"font-size:10.5pt;">CREATE TRIGGER "TR_STG_APPLICATION_CDIM_I=
NS" BEFORE INSERT OR UPDATE ON "ECISDRDM"."STG_APPLICATION_CDIM" FOR EACH R=
OW EXECUTE PROCEDURE "ECISDRDM"."TRIGGER_FCT_TR_STG_APPLICATION_CDIM_INS"()
 ;</span></p>=20
</blockquote>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">I even " RAISE EXCEPTION 'UNKNOWN'; " and for=
 the mig_insert_dt, I put either '=3D' or ':=3D' Now(), now(), localtimesta=
mp, timestamp,
 and none of them would fill the time. Both mig.filename and mig_insert_dt =
are still blank.</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">"</span></p>=20
</div>
<blockquote style=3D"margin-left:6.0pt;margin-top:3.0pt;margin-right:0in;ma=
rgin-bottom:3.0pt;font-stretch:inherit;line-height:inherit;">
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">if new.mig_filename IS NULL then&nbsp;</span>=
</p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">&nbsp; &nbsp; RAISE EXCEPTION 'UNKNOWN';</spa=
n></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">&nbsp; &nbsp; new.mig_filename :=3D 'Unknown'=
;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">end if;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal" style=3D"vertical-align:baseline;"><spa=
n style=3D"font-size:10.5pt;">new.mig_insert_dt '=3D now();&nbsp; &nbsp;</s=
pan><span style=3D"font-size:10.5pt;"></span></p>=20
</div>
</blockquote>
</div>
<p class=3D"yiv0934717431MsoNormal"><span style=3D"font-size:12.0pt;"> &nbs=
p;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal"><span style=3D"font-size:12.0pt;">Accor=
ding to the postgres example 39-3 "shows an example of trigger procedure in=
 PL/pgSQL", I don't see any different with the example and don't know what =
I have missed here.&nbsp;
 W<span style=3D"color:black;">ould you please advise what I did wrong here=
?&nbsp;&nbsp;</span></span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal"><span style=3D"font-size:12.0pt;"> &nbs=
p;</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal"><span style=3D"font-size:12.0pt;">thank=
 you,</span></p>=20
</div>
<div>
<p class=3D"yiv0934717431MsoNormal"><span style=3D"font-size:12.0pt;"> &nbs=
p;</span></p>=20
</div>
<div>
<div id=3D"yiv0934717431ydp3b190d25yui_3_13_0_rc_1_1_1381789421038_7868">
<div id=3D"yiv0934717431ydp3b190d25yui_3_13_0_rc_1_1_1381789421038_7874">
<p class=3D"yiv0934717431MsoNormal"><span class=3D"yiv0934717431ydp3b190d25=
yiv3811552299sg"><b><span style=3D"font-size:12.0pt;">Bach-Nga</span></b></=
span><b><span style=3D"font-size:12.0pt;"><br clear=3D"none">
<br clear=3D"none">
</span></b><span class=3D"yiv0934717431ydp3b190d25yiv3811552299sg"><span st=
yle=3D"font-size:12.0pt;">No one in this world is pure and perfect.&nbsp; I=
f you avoid people for their mistakes you will be alone. So judge less, lov=
e and forgive
 more.</span></span><span style=3D"font-size:12.0pt;"></span></p>=20
</div>
<div id=3D"yiv0934717431ydp3b190d25yui_3_13_0_rc_1_1_1381789421038_7874">
<p class=3D"yiv0934717431MsoNormal"><span class=3D"yiv0934717431ydp3b190d25=
yiv3811552299sg"><span style=3D"font-size:12.0pt;">To call him a dog hardly=
 seems to do him justice though in as much as he had four legs, a tail, and=
 barked, I admit he
 was, to all outward appearances. But to those who knew him well, he was a =
perfect gentleman (Hermione Gingold)</span></span><span style=3D"font-size:=
12.0pt;"></span></p>=20
</div>
<p class=3D"yiv0934717431MsoNormal"><span style=3D"font-size:12.0pt;"><br c=
lear=3D"none">
<span style=3D"color:#8000FF;">**Live simply **Love generously **Care deepl=
y **Speak kindly.</span></span></p>=20
</div>
<div id=3D"yiv0934717431ydp3b190d25yui_3_13_0_rc_1_1_1381789421038_7866">
<p class=3D"yiv0934717431MsoNormal"><span class=3D"yiv0934717431ydp3b190d25=
yiv3811552299sg"><span style=3D"font-size:12.0pt;">*** Genuinely rich *** F=
aithful talent *** Sharing success</span></span><span style=3D"font-size:12=
.0pt;"><br clear=3D"none">
<br clear=3D"none">
</span><span style=3D"font-size:12.0pt;"></span></p>=20
</div>
</div>
</div></div>
</div>
<div>-----------------------------------------<div>Moody's monitors email c=
ommunications through its networks for regulatory compliance purposes and t=
o protect its customers, employees and business and where allowed to do so =
by applicable law. The information contained in this e-mail message, and an=
y attachment thereto, is confidential and may not be disclosed without our =
express permission. If you are not the intended recipient or an employee or=
 agent responsible for delivering this message to the intended recipient, y=
ou are hereby notified that you have received this message in error and tha=
t any review, dissemination, distribution or copying of this message, or an=
y attachment thereto, in whole or in part, is strictly prohibited. If you h=
ave received this message in error, please immediately notify us by telepho=
ne, fax or e-mail and delete the message and all of its attachments. Every =
effort is made to keep our network free from viruses. You should, however, =
review this e-mail message, as well as any attachment thereto, for viruses.=
 We take no responsibility and have no liability for any computer virus whi=
ch may be transferred via this e-mail message. <br clear=3D"none"><br clear=
=3D"none">This email was sent to you by Moody=E2=80=99s Investors Service E=
MEA Limited<br clear=3D"none">Registered office address:<br clear=3D"none">=
One Canada Square<br clear=3D"none">Canary Wharf<br clear=3D"none">London, =
E14 5FA<br clear=3D"none">Registered in England and Wales No: 8922701<div>-=
----------------------------------------</div></div></div></div></div></div=
>
            </div>
        </div></body></html>
------=_Part_2395305_1754697543.1570204412032--