• [Info-ingres] OME and 11.2

    From Martin Bowes@21:1/5 to All on Fri Jul 30 10:57:02 2021
    Hi all,

    Having installed a fresh installation of 11.2, for some reason, the thought of making an OME function to convert a hex string into its integer8 equivalent came to mind. And so:

    select hex2int('a'), hex2int('0xb'), hex2int('+0xc'), hex2int('-0xd')

    ‚€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ƒ
    col1 col2 col3 col4 
    †€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€‡
     10 11 12 -13
    „€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€…
    (1 row)

    Yep, that looks good! Now for some error testing:
    select hex2int('wrong')
    E_US2525 'hex2int' is only supported by queries on X100 tables.

    What?

    And in fact whenever my code finds a condition in which it generates an error, I get the above error at the front end rather than my error text. Nothing comes into the errlog.

    Can anyone shed some light on that one please.

    Marty

    <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
    <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style><!--
    /* Font Definitions */
    @font-face
    {font-family:"Cambria Math";
    panose-1:2 4 5 3 5 4 6 3 2 4;}
    @font-face
    {font-family:Calibri;
    panose-1:2 15 5 2 2 2 4 3 2 4;}
    @font-face
    {font-family:"Lucida Console";
    panose-1:2 11 6 9 4 5 4 2 2 4;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin:0cm;
    margin-bottom:.0001pt;
    font-size:11.0pt;
    font-family:"Calibri",sans-serif;
    mso-fareast-language:EN-US;}
    a:link, span.MsoHyperlink
    {mso-style-priority:99;
    color:#0563C1;
    text-decoration:underline;}
    a:visited, span.MsoHyperlinkFollowed
    {mso-style-priority:99;
    color:#954F72;
    text-decoration:underline;}
    span.EmailStyle17
    {mso-style-type:personal-compose;
    font-family:"Calibri",sans-serif;
    color:windowtext;}
    .MsoChpDefault
    {mso-style-type:export-only;
    mso-fareast-language:EN-US;}
    @page WordSection1
    {size:612.0pt 792.0pt;
    margin:72.0pt 72.0pt 72.0pt 72.0pt;}
    div.WordSection1
    {page:WordSection1;}
    </style><!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext="edit" spidmax="1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang="EN-GB" link="#0563C1" vlink="#954F72">
    <div class="WordSection1">
    <p class="MsoNormal">Hi all,<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Having installed a fresh installation of 11.2, for some reason, the thought of making an OME function to convert a hex string into its integer8 equivalent came to mind. And so:<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">select hex2int('a'), hex2int('0xb'), hex2int('&#43;0xc'), hex2int('-0xd')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">‚€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ƒ<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">col1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; col2&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; col3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; col4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">†€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€‡<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -13<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">„€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€…<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">(1 row)<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Yep, that looks good! Now for some error testing:<o:p></o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">select hex2int('wrong')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">E_US2525 'hex2int' is only supported by queries on X100 tables.<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">What?<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">And in fact whenever my code finds a condition in which it generates an error, I get the above error at the front end rather than my error text. Nothing comes into the errlog.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Can anyone shed some light on that one please.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Marty<o:p></o:p></p>
    </div>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Bowes@21:1/5 to Martin Bowes on Fri Jul 30 11:20:00 2021
    To: info-ingres@lists.planetingres.org (info-ingres@lists.planetingres.org)

    Me again,

    For comparison on an 11.1 installation this is what the error testing shows: select hex2int('asdf')
    Executing . . .

    E_OME001 hex2int(): Non hex character 's' found in string.
    (Fri Jul 30 12:18:26 2021)

    continue
    * * *
    select hex2int('wrong')
    Executing . . .

    E_OME001 hex2int(): Non hex character 'w' found in string.
    (Fri Jul 30 12:18:26 2021)

    continue
    * * select hex2int('')
    Executing . . .

    E_OME001 hex2int(): No convertable characters in input string
    (Fri Jul 30 12:18:26 2021)

    continue
    * * select hex2int('0x8fffffffffffffff')
    Executing . . .

    E_OME001 hex2int(): Numeric Overflow has occurred.
    (Fri Jul 30 12:18:26 2021)

    continue
    * * select hex2int('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')
    Executing . . .

    E_OME001 hex2int(): character string is too long for conversion.
    (Fri Jul 30 12:18:26 2021)


    Marty

    From: Martin Bowes <martin.bowes@ndph.ox.ac.uk>
    Sent: 30 July 2021 11:57
    To: info-ingres@lists.planetingres.org
    Subject: [Info-ingres] OME and 11.2

    Hi all,

    Having installed a fresh installation of 11.2, for some reason, the thought of making an OME function to convert a hex string into its integer8 equivalent came to mind. And so:

    select hex2int('a'), hex2int('0xb'), hex2int('+0xc'), hex2int('-0xd')

    ‚€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ƒ
    col1 col2 col3 col4 
    †€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€‡
     10 11 12 -13
    „€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€…
    (1 row)

    Yep, that looks good! Now for some error testing:
    select hex2int('wrong')
    E_US2525 'hex2int' is only supported by queries on X100 tables.

    What?

    And in fact whenever my code finds a condition in which it generates an error, I get the above error at the front end rather than my error text. Nothing comes into the errlog.

    Can anyone shed some light on that one please.

    Marty

    <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
    <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style><!--
    /* Font Definitions */
    @font-face
    {font-family:"Cambria Math";
    panose-1:2 4 5 3 5 4 6 3 2 4;}
    @font-face
    {font-family:Calibri;
    panose-1:2 15 5 2 2 2 4 3 2 4;}
    @font-face
    {font-family:"Lucida Console";
    panose-1:2 11 6 9 4 5 4 2 2 4;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin:0cm;
    margin-bottom:.0001pt;
    font-size:11.0pt;
    font-family:"Calibri",sans-serif;
    mso-fareast-language:EN-US;}
    a:link, span.MsoHyperlink
    {mso-style-priority:99;
    color:#0563C1;
    text-decoration:underline;}
    a:visited, span.MsoHyperlinkFollowed
    {mso-style-priority:99;
    color:#954F72;
    text-decoration:underline;}
    p.msonormal0, li.msonormal0, div.msonormal0
    {mso-style-name:msonormal;
    mso-margin-top-alt:auto;
    margin-right:0cm;
    mso-margin-bottom-alt:auto;
    margin-left:0cm;
    font-size:12.0pt;
    font-family:"Times New Roman",serif;}
    span.EmailStyle18
    {mso-style-type:personal;
    font-family:"Calibri",sans-serif;
    color:windowtext;}
    span.EmailStyle19
    {mso-style-type:personal-reply;
    font-family:"Calibri",sans-serif;
    color:#1F497D;}
    .MsoChpDefault
    {mso-style-type:export-only;
    font-size:10.0pt;}
    @page WordSection1
    {size:612.0pt 792.0pt;
    margin:72.0pt 72.0pt 72.0pt 72.0pt;}
    div.WordSection1
    {page:WordSection1;}
    </style><!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext="edit" spidmax="1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang="EN-GB" link="#0563C1" vlink="#954F72">
    <div class="WordSection1">
    <p class="MsoNormal"><span style="color:#1F497D">Me again,<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span style="color:#1F497D">For comparison on an 11.1 installation this is what the error testing shows:<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">select hex2int('asdf')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">Executing . . .<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">E_OME001 hex2int(): Non hex character 's' found in string.<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp; (Fri Jul 30 12:18:26 2021)<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">continue<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">* * *<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">select hex2int('wrong')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">Executing . . .<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">E_OME001 hex2int(): Non hex character 'w' found in string.<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp; (Fri Jul 30 12:18:26 2021)<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">continue<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">* * select hex2int('')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">Executing . . .<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">E_OME001 hex2int(): No convertable characters in input string<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp; (Fri Jul 30 12:18:26 2021)<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">continue<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">* * select hex2int('0x8fffffffffffffff')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">Executing . . .<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">E_OME001 hex2int(): Numeric Overflow has occurred.<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp; (Fri Jul 30 12:18:26 2021)<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">continue<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">* * select hex2int('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')<o:p></o:p></
    span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">Executing . . .<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">E_OME001 hex2int(): character string is too long for conversion.<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp; (Fri Jul 30 12:18:26 2021)<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span style="color:#1F497D">Marty<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p> <div>
    <div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
    <p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Martin Bowes &lt;martin.bowes@ndph.ox.ac.uk&gt;

    <b>Sent:</b> 30 July 2021 11:57<br>
    <b>To:</b> info-ingres@lists.planetingres.org<br>
    <b>Subject:</b> [Info-ingres] OME and 11.2<o:p></o:p></span></p>
    </div>
    </div>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Hi all,<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Having installed a fresh installation of 11.2, for some reason, the thought of making an OME function to convert a hex string into its integer8 equivalent came to mind. And so:<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">select hex2int('a'), hex2int('0xb'), hex2int('&#43;0xc'), hex2int('-0xd')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">‚€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€ƒ<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">col1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; col2&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; col3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; col4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">†€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€‡<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -13<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">„€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€…<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">(1 row)<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Yep, that looks good! Now for some error testing:<o:p></o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">select hex2int('wrong')<o:p></o:p></span></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;">E_US2525 'hex2int' is only supported by queries on X100 tables.<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">What?<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">And in fact whenever my code finds a condition in which it generates an error, I get the above error at the front end rather than my error text. Nothing comes into the errlog.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Can anyone shed some light on that one please.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Marty<o:p></o:p></p>
    </div>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)