• [Info-ingres] The column with no datatype

    From Martin Bowes@21:1/5 to All on Fri Jun 18 10:25:00 2021
    Hi All,

    So one day I did...
    copydb -c -uoqs oqs_result_live ztrans_symdig
    INGRES COPYDB Copyright 2016 Actian Corporation
    Unload directory is '/user/ingres'.
    Reload directory is '/user/ingres'.
    There are 0 sequences owned by user 'oqs'.
    There is one table owned by user 'oqs'.
    E_AD2003 ADF routine was passed an unknown datatype name.

    'WTF!' I thought to myself and after some investigation....

    select column_sequence, column_datatype
    from iicolumns
    where table_name='ztrans_symdig' and column_name = 'responses';

    ‚€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ƒ column_sequencecolumn_datatype  †€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€‡
     18  „€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€…
    (1 row)
    How is that possible?

    Now iicolumns is a view and so I went back to the iirelation and iiattribute tables:

    select varchar(r.relid, 13), attid, varchar(attname, 13),
    a.attfrmt, a.attfrml,
    varchar(uppercase(iitypename(ii_ext_type(a.attfrmt, a.attfrml))), 12) as datatype
    from iiattribute a
    join iirelation r on a.attrelid = r.reltid and a.attrelidx = r.reltidx where a.attname = 'responses'

    ‚€€€€€€€€€€€€€ˆ€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€€€€€€ƒ
    col1 attid col3 attfrmtattfrml datatype  †€€€€€€€€€€€€€Š€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€€€€€€‡
    symdig  18responses  22 32LONG VARCHAR ztrans_symdig 18responses  36 16  „€€€€€€€€€€€€€‰€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€€€€€€…
    (2 rows)

    I'm trying to track down how the user has created this table and if they have a log of the activity.
    I think the user is doing a create table ztrans_symdig as select * from symdig where 1 = 0;
    However, when I try this the responses column correctly becomes a long varchar without any problem.

    Any suggestions?

    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;
    font-family:"Calibri",sans-serif;
    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">So one day I did&#8230;<o:p></o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;,serif">copydb -c -uoqs oqs_result_live ztrans_symdig<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;,serif">INGRES COPYDB Copyright 2016 Actian Corporation<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;,serif">Unload directory is '/user/ingres'.<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;,serif">Reload directory is '/user/ingres'.<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;,serif">There are 0 sequences owned by user 'oqs'.<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;,serif">There is one table owned by user 'oqs'.<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;,serif;background:yellow;mso-highlight:yellow">E_AD2003 ADF routine was passed an unknown datatype name.</span><span style="font-size:10.
    0pt;font-family:&quot;Lucida Console&quot;,serif"><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;,serif"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal">&#8216;WTF!&#8217; I thought to myself and after some investigation&#8230;.<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;,serif">select column_sequence, column_datatype<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;,serif">from iicolumns<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;,serif">where table_name='ztrans_symdig' and column_name = 'responses';<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;,serif"><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;,serif">‚€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ƒ<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;,serif">column_sequencecolumn_datatype&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;,serif">†€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€‡<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;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;,serif">„€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€…<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;,serif">(1 row)<o:p></o:p></span></p>
    <p class="MsoNormal">How is that possible?<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Now iicolumns is a view and so I went back to the iirelation and iiattribute tables:<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;,serif">select varchar(r.relid, 13), attid, varchar(attname, 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;,serif">a.attfrmt, a.attfrml,<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;,serif">varchar(uppercase(iitypename(ii_ext_type(a.attfrmt, a.attfrml))), 12) as datatype<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;,serif">from iiattribute a<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;,serif">&nbsp;&nbsp;&nbsp; join iirelation r on a.attrelid = r.reltid and a.attrelidx = r.reltidx<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;,serif">where a.attname = 'responses'<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;,serif"><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;,serif">‚€€€€€€€€€€€€€ˆ€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€€€€€€ƒ<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;,serif">col1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attid col3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attfrmt
    attfrml&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datatype&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;,serif">†€€€€€€€€€€€€€Š€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€€€€€€‡<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;,serif">symdig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 18responses&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 22&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32LONG VARCHAR<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;,serif">ztrans_symdig&nbsp;&nbsp; &nbsp;18responses&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 36&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp; 16&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;,serif">„€€€€€€€€€€€€€‰€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€€€€€€…<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;,serif">(2 rows)<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">I&#8217;m trying to track down how the user has created this table and if they have a log of the activity.<o:p></o:p></p>
    <p class="MsoNormal">I think the user is doing a create table ztrans_symdig as select * from symdig where 1 = 0;<o:p></o:p></p>
    <p class="MsoNormal">However, &nbsp;when I try this the responses column correctly becomes a long varchar without any problem.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Any suggestions?<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 Paul White@21:1/5 to Martin Bowes on Fri Jun 18 22:08:22 2021
    This is a multi-part message in MIME format.
    This is a bit like Colonel Mustard in the Drawing room with the ice pick


    Need some clues Marty.

    help table?Β Β  create time?Β  what is in errlog.log, iidbms...log around
    the time?

    Is the database and table journaled?Β  Maybe run auditdb
    -aborted_transactions near the create time.

    What is the state of the the extended table?

    select r1.relid as base_table, c.attname as column_name, r2.relid as extend_table
    from iirelation r1,iirelation r2,iiattribute c,iiextended_relation e
    where r1.reltid=e.etab_base and r2.reltid=e.etab_extension
    Β  and r1.reltid=c.attrelid
    Β  and c.attid=e.etab_attid
    Β  and r1.reltidx=0
    Β  and c.attrelidx=0
    where column_name = 'responses'
    order by base_table,column_name

    help table (r2.relid from above)

    select * from iirelation where table_name = (r2.relid from above)

    Paul


    On 18/06/2021 9:18 pm, Martin Bowes wrote:

    Hi All,

    Knowing the perverted nature of the user in question I wondered if he
    had created the table from a distributed database via a statement like:

    direct execute immediate β€˜create table ztrans_symdig as select * from symdig’

    with node = β€˜β€¦β€™, database =’…’

    So I set up a test case and … nope, worked perfectly.

    The user’s log file had better be phenomenally good.

    Marty

    *From:*Martin Bowes <martin.bowes@ndph.ox.ac.uk>
    *Sent:* 18 June 2021 11:25
    *To:* info-ingres@lists.planetingres.org
    *Subject:* [Info-ingres] The column with no datatype

    Hi All,

    So one day I did…

    copydb -c -uoqs oqs_result_live ztrans_symdig

    INGRES COPYDB Copyright 2016 Actian Corporation

    Unload directory is '/user/ingres'.

    Reload directory is '/user/ingres'.

    There are 0 sequences owned by user 'oqs'.

    There is one table owned by user 'oqs'.

    E_AD2003 ADF routine was passed an unknown datatype name.

    β€˜WTF!’ I thought to myself and after some investigation….

    select column_sequence, column_datatype

    from iicolumns

    where table_name='ztrans_symdig' and column_name = 'responses';

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

    β”‚column_sequenceβ”‚column_datatype β”‚

    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

    β”‚ 18β”‚Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  β”‚

    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    (1 row)

    How is that possible?

    Now iicolumns is a view and so I went back to the iirelation and
    iiattribute tables:

    select varchar(r.relid, 13), attid, varchar(attname, 13),

    a.attfrmt, a.attfrml,

    varchar(uppercase(iitypename(ii_ext_type(a.attfrmt, a.attfrml))), 12)
    as datatype

    from iiattribute a

    Β Β Β  join iirelation r on a.attrelid = r.reltid and a.attrelidx = r.reltidx

    where a.attname = 'responses'

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

    β”‚col1Β Β Β Β Β Β Β Β  β”‚attid β”‚col3 β”‚attfrmtβ”‚attfrmlΒ Β Β Β Β  β”‚datatypeΒ Β Β  β”‚

    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

    β”‚symdigΒ Β Β Β Β Β  β”‚Β Β Β  18β”‚responses β”‚Β Β Β Β  22β”‚Β Β Β Β Β Β Β Β Β Β  32β”‚LONG VARCHARβ”‚

    β”‚ztrans_symdigβ”‚Β Β  Β 18β”‚responses β”‚Β Β Β Β  36β”‚Β Β Β Β Β Β Β Β Β Β  16β”‚Β Β Β Β Β Β Β Β Β Β Β  β”‚

    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    (2 rows)

    I’m trying to track down how the user has created this table and if
    they have a log of the activity.

    I think the user is doing a create table ztrans_symdig as select *
    from symdig where 1 = 0;

    However, Β when I try this the responses column correctly becomes a
    long varchar without any problem.

    Any suggestions?

    Marty


    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <p>This is a bit like Colonel Mustard in the Drawing room with the
    ice pick</p>
    <p><br>
    </p>
    <p>Need some clues Marty.Β  <br>
    </p>
    <p>help table?Β Β  create time?Β  what is in errlog.log, iidbms...logΒ 
    around the time?<br>
    </p>
    <p>Is the database and table journaled?Β  Maybe run auditdb
    -aborted_transactions near the create time.<br>
    </p>
    <p>What is the state of the the extended table?</p>
    <font face="monospace">select r1.relid as base_table, c.attname as
    column_name, r2.relid as extend_table<br>
    from iirelation r1,iirelation r2,iiattribute c,iiextended_relation
    e<br>
    where r1.reltid=e.etab_base and r2.reltid=e.etab_extension<br>
    Β  and r1.reltid=c.attrelid<br>
    Β  and c.attid=e.etab_attid<br>
    Β  and r1.reltidx=0<br>
    Β  and c.attrelidx=0</font><br>
    <font face="monospace">where column_name = 'responses'</font><br>
    <font face="monospace">order by base_table,column_name</font>
    <p><font face="monospace">help table </font><font face="monospace"><font
    face="monospace">(r2.relid from above)</font></font></p>
    <p><font face="monospace"><font face="monospace"></font>select *
    from iirelation where table_name = (r2.relid from above)<br>
    </font></p>
    <p><font face="monospace">Paul</font></p>
    <p><br>
    </p>
    <p>On 18/06/2021 9:18 pm, Martin Bowes wrote:<br>
    </p>
    <blockquote type="cite"
    cite="mid:872004ef44ee43719846ee4d2f0d9eca@ndph.ox.ac.uk">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="Generator" content="Microsoft Word 15 (filtered
    medium)">
    <style>@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;}@font-face
    {font-family:"MS PGothic";
    panose-1:2 11 6 0 7 2 5 8 2 4;}@font-face
    {font-family:"\@MS PGothic";}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:"MS PGothic",sans-serif;
    mso-fareast-language:JA;}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;}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]-->
    <div class="WordSection1">
    <p class="MsoNormal"><span style="color:#1F497D">Hi All,<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>Β </o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">Knowing the
    perverted nature of the user in question I wondered if he
    had created the table from a distributed database via a
    statement like:<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>Β </o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">direct execute
    immediate β€˜create table ztrans_symdig as select * from
    symdig’<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">with node =
    β€˜β€¦β€™, database =’…’<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>Β </o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">So I set up a
    test case and … nope, worked perfectly.<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>Β </o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">The user’s log
    file had better be phenomenally good.<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>Β </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>Β </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
    style="mso-fareast-language:JA" lang="EN-US">From:</span></b><span
    style="mso-fareast-language:JA" lang="EN-US"> Martin
    Bowes <a class="moz-txt-link-rfc2396E" href="mailto:martin.bowes@ndph.ox.ac.uk">&lt;martin.bowes@ndph.ox.ac.uk&gt;</a>
    <br>
    <b>Sent:</b> 18 June 2021 11:25<br>
    <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a><br>
    <b>Subject:</b> [Info-ingres] The column with no
    datatype<o:p></o:p></span></p>
    </div>
    </div>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal">Hi All,<o:p></o:p></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal">So one day I did…<o:p></o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif">copydb -c -uoqs oqs_result_live
    ztrans_symdig<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;,serif">INGRES COPYDB Copyright 2016 Actian
    Corporation<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;,serif">Unload directory is '/user/ingres'.<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;,serif">Reload directory is '/user/ingres'.<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;,serif">There are 0 sequences owned by user
    'oqs'.<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;,serif">There is one table owned by user 'oqs'.<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;,serif;background:yellow;mso-highlight:yellow">E_AD2003
    ADF routine was passed an unknown datatype name.</span><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif"><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;,serif"><o:p>Β </o:p></span></p>
    <p class="MsoNormal">β€˜WTF!’ I thought to myself and after some
    investigation….<o:p></o:p></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif">select column_sequence, column_datatype<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;,serif">from iicolumns<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;,serif">where table_name='ztrans_symdig' and
    column_name = 'responses';<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;,serif"><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;,serif">β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”<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;,serif">β”‚column_sequenceβ”‚column_datatypeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β 
    β”‚<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;,serif">β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€<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;,serif">β”‚Β Β Β Β Β Β Β Β Β Β Β Β 
    18β”‚Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  β”‚<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;,serif">β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜<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;,serif">(1 row)<o:p></o:p></span></p>
    <p class="MsoNormal">How is that possible?<o:p></o:p></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal">Now iicolumns is a view and so I went back
    to the iirelation and iiattribute tables:<o:p></o:p></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif">select varchar(r.relid, 13), attid,
    varchar(attname, 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;,serif">a.attfrmt, a.attfrml,<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;,serif">varchar(uppercase(iitypename(ii_ext_type(a.attfrmt,
    a.attfrml))), 12) as datatype<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;,serif">from iiattribute a<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;,serif">Β Β Β  join iirelation r on a.attrelid =
    r.reltid and a.attrelidx = r.reltidx<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;,serif">where a.attname = 'responses'<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;,serif"><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;,serif">β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”<o:p></o:
    </span></p>
    <p class="MsoNormal" style="text-autospace:none"><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif">β”‚col1Β Β Β Β Β Β Β Β  β”‚attid β”‚col3Β Β Β Β Β Β Β Β 
    β”‚attfrmtβ”‚attfrmlΒ Β Β Β Β  β”‚datatypeΒ Β Β  β”‚<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;,serif">β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€<o:p></o:
    </span></p>
    <p class="MsoNormal" style="text-autospace:none"><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif">β”‚symdigΒ Β Β Β Β Β  β”‚Β Β Β  18β”‚responsesΒ Β Β 
    β”‚Β Β Β Β  22β”‚Β Β Β Β Β Β Β Β Β Β  32β”‚LONG VARCHARβ”‚<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;,serif">β”‚ztrans_symdigβ”‚Β Β  Β 18β”‚responsesΒ Β Β 
    β”‚Β Β Β Β  36β”‚Β Β Β Β Β Β Β Β Β Β  16β”‚Β Β Β Β Β Β Β Β Β Β Β  β”‚<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;,serif">β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜<o:p></o:
    </span></p>
    <p class="MsoNormal" style="text-autospace:none"><span
    style="font-size:10.0pt;font-family:&quot;Lucida
    Console&quot;,serif">(2 rows)<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal">I’m trying to track down how the user has
    created this table and if they have a log of the activity.<o:p></o:p></p>
    <p class="MsoNormal">I think the user is doing a create table
    ztrans_symdig as select * from symdig where 1 = 0;<o:p></o:p></p>
    <p class="MsoNormal">However, Β when I try this the responses
    column correctly becomes a long varchar without any problem.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal">Any suggestions?<o:p></o:p></p>
    <p class="MsoNormal"><o:p>Β </o:p></p>
    <p class="MsoNormal">Marty<o:p></o:p></p>
    </div>
    <br>
    <fieldset class="mimeAttachmentHeader"></fieldset>
    <pre class="moz-quote-pre" wrap="">_______________________________________________
    Info-ingres mailing list
    <a class="moz-txt-link-abbreviated" href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a>
    <a class="moz-txt-link-freetext" href="https://lists.planetingres.org/mailman/listinfo/info-ingres">https://lists.planetingres.org/mailman/listinfo/info-ingres</a>
    </pre>
    </blockquote>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Bowes@21:1/5 to All on Fri Jun 18 11:18:42 2021
    Hi All,

    Knowing the perverted nature of the user in question I wondered if he had created the table from a distributed database via a statement like:

    direct execute immediate 'create table ztrans_symdig as select * from symdig' with node = '...', database ='...'

    So I set up a test case and ... nope, worked perfectly.

    The user's log file had better be phenomenally good.

    Marty

    From: Martin Bowes <martin.bowes@ndph.ox.ac.uk>
    Sent: 18 June 2021 11:25
    To: info-ingres@lists.planetingres.org
    Subject: [Info-ingres] The column with no datatype

    Hi All,

    So one day I did...
    copydb -c -uoqs oqs_result_live ztrans_symdig
    INGRES COPYDB Copyright 2016 Actian Corporation
    Unload directory is '/user/ingres'.
    Reload directory is '/user/ingres'.
    There are 0 sequences owned by user 'oqs'.
    There is one table owned by user 'oqs'.
    E_AD2003 ADF routine was passed an unknown datatype name.

    'WTF!' I thought to myself and after some investigation....

    select column_sequence, column_datatype
    from iicolumns
    where table_name='ztrans_symdig' and column_name = 'responses';

    ‚€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ƒ column_sequencecolumn_datatype  †€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€‡
     18  „€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€…
    (1 row)
    How is that possible?

    Now iicolumns is a view and so I went back to the iirelation and iiattribute tables:

    select varchar(r.relid, 13), attid, varchar(attname, 13),
    a.attfrmt, a.attfrml,
    varchar(uppercase(iitypename(ii_ext_type(a.attfrmt, a.attfrml))), 12) as datatype
    from iiattribute a
    join iirelation r on a.attrelid = r.reltid and a.attrelidx = r.reltidx where a.attname = 'responses'

    ‚€€€€€€€€€€€€€ˆ€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€€€€€€ƒ
    col1 attid col3 attfrmtattfrml datatype  †€€€€€€€€€€€€€Š€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€€€€€€‡
    symdig  18responses  22 32LONG VARCHAR ztrans_symdig 18responses  36 16  „€€€€€€€€€€€€€‰€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€€€€€€…
    (2 rows)

    I'm trying to track down how the user has created this table and if they have a log of the activity.
    I think the user is doing a create table ztrans_symdig as select * from symdig where 1 = 0;
    However, when I try this the responses column correctly becomes a long varchar without any problem.

    Any suggestions?

    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;}
    @font-face
    {font-family:"MS PGothic";
    panose-1:2 11 6 0 7 2 5 8 2 4;}
    @font-face
    {font-family:"\@MS PGothic";}
    /* 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:"MS PGothic",sans-serif;
    mso-fareast-language:JA;}
    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">Hi All,<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">Knowing the perverted nature of the user in question I wondered if he had created the table from a distributed database via a statement like:<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">direct execute immediate &#8216;create table ztrans_symdig as select * from symdig&#8217;<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">with node = &#8216;&#8230;&#8217;, database =&#8217;&#8230;&#8217;<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">So I set up a test case and &#8230; nope, worked perfectly.<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">The user&#8217;s log file had better be phenomenally good.<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">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:JA">From:</span></b><span lang="EN-US" style="mso-fareast-language:JA"> Martin Bowes &lt;martin.bowes@ndph.ox.ac.uk&gt;

    <b>Sent:</b> 18 June 2021 11:25<br>
    <b>To:</b> info-ingres@lists.planetingres.org<br>
    <b>Subject:</b> [Info-ingres] The column with no datatype<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">So one day I did&#8230;<o:p></o:p></p>
    <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;,serif">copydb -c -uoqs oqs_result_live ztrans_symdig<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;,serif">INGRES COPYDB Copyright 2016 Actian Corporation<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;,serif">Unload directory is '/user/ingres'.<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;,serif">Reload directory is '/user/ingres'.<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;,serif">There are 0 sequences owned by user 'oqs'.<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;,serif">There is one table owned by user 'oqs'.<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;,serif;background:yellow;mso-highlight:yellow">E_AD2003 ADF routine was passed an unknown datatype name.</span><span style="font-size:10.
    0pt;font-family:&quot;Lucida Console&quot;,serif"><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;,serif"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal">&#8216;WTF!&#8217; I thought to myself and after some investigation&#8230;.<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;,serif">select column_sequence, column_datatype<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;,serif">from iicolumns<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;,serif">where table_name='ztrans_symdig' and column_name = 'responses';<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;,serif"><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;,serif">‚€€€€€€€€€€€€€€€ˆ€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ƒ<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;,serif">column_sequencecolumn_datatype&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;,serif">†€€€€€€€€€€€€€€€Š€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€‡<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;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
    nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;,serif">„€€€€€€€€€€€€€€€‰€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€…<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;,serif">(1 row)<o:p></o:p></span></p>
    <p class="MsoNormal">How is that possible?<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Now iicolumns is a view and so I went back to the iirelation and iiattribute tables:<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;,serif">select varchar(r.relid, 13), attid, varchar(attname, 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;,serif">a.attfrmt, a.attfrml,<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;,serif">varchar(uppercase(iitypename(ii_ext_type(a.attfrmt, a.attfrml))), 12) as datatype<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;,serif">from iiattribute a<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;,serif">&nbsp;&nbsp;&nbsp; join iirelation r on a.attrelid = r.reltid and a.attrelidx = r.reltidx<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;,serif">where a.attname = 'responses'<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;,serif"><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;,serif">‚€€€€€€€€€€€€€ˆ€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€ˆ€€€€€€€€€€€€€ˆ€€€€€€€€€€€€ƒ<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;,serif">col1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attid col3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attfrmt
    attfrml&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datatype&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;,serif">†€€€€€€€€€€€€€Š€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€Š€€€€€€€€€€€€€Š€€€€€€€€€€€€‡<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;,serif">symdig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 18responses&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 22&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32LONG VARCHAR<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;,serif">ztrans_symdig&nbsp;&nbsp; &nbsp;18responses&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 36&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp; 16&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;,serif">„€€€€€€€€€€€€€‰€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€‰€€€€€€€€€€€€€‰€€€€€€€€€€€€…<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;,serif">(2 rows)<o:p></o:p></span></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">I&#8217;m trying to track down how the user has created this table and if they have a log of the activity.<o:p></o:p></p>
    <p class="MsoNormal">I think the user is doing a create table ztrans_symdig as select * from symdig where 1 = 0;<o:p></o:p></p>
    <p class="MsoNormal">However, &nbsp;when I try this the responses column correctly becomes a long varchar without any problem.<o:p></o:p></p>
    <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
    <p class="MsoNormal">Any suggestions?<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)