Strange Behavior when calling a C function by a plpgsql stored prcedure
От | Alban Médici |
---|---|
Тема | Strange Behavior when calling a C function by a plpgsql stored prcedure |
Дата | |
Msg-id | 3CD2A543.5030408@fr.netcentrex.net обсуждение исходный текст |
Ответы |
Re: Strange Behavior when calling a C function by a plpgsql stored prcedure
|
Список | pgsql-bugs |
In some plpgsql method, I call some C function with a optional parameters.<br /><br /> This is the signature of my function:<br /><br /><i>extern "C" My_Mem_Macro_Parser_Integer myMethod( int nbFields, int toto = -1)<br /> {<br /> blablabla.....<br /> return integer;<br /> }<br /></i><br /><br /> When I call this function with the second parameters,there's no problems.<br /><br /> But if I call without toto :<br /> plpgsql:<br /><br /><i>CREATE FUNCTION CallMymethodWithoutToto( INTEGER -- [IN] nb Field<br /> )<br /> RETURNS INTEGER AS '<br /> 'path2MyLib/MyLib.so','myMethod'<br /> LANGUAGE 'C';</i><br /><br /> Appear a strange Behavior :<br /> I'm explain,<br />in myC function, I switch the value of toto, try to find "-1".<br /> But I NEVER have "-1".<br /><br /> I this case I alwayshave "8" in toto integer !!!!!!<br /><br /><br /><br /><pre class="moz-signature" cols="$mailwrapcol">-- Alban Médici R&D Software Engineer tel: +33 (0)2 31 46 35 80 (+005) -------------------------------- <a class="moz-txt-link-freetext" href="http://www.netcentrex.net">http://www.netcentrex.net</a> <a class="moz-txt-link-abbreviated" href="mailto:amedici@fr.netcentrex.net">amedici@fr.netcentrex.net</a></pre>
В списке pgsql-bugs по дате отправления: