title: {InternalError}ERROR: Assert false - Invalid type: 705
body: <p>based on <a href="https://pygresql.readthedocs.io/en/latest/contents/pg/adaptation.html" rel="nofollow noreferrer">https://pygresql.readthedocs.io/en/latest/contents/pg/adaptation.html</a></p>
  <blockquote>
  <p>sql = &quot;SELECT * FROM user_table WHERE login = %s AND passwd = %s&quot;</p>
  </blockquote>
  <blockquote>
  <p>db.query_formatted(sql, (login, passwd)).getresult()[0]</p>
  </blockquote>
  <p>I reused this snippet of code to try to use the library SQL replacement as shown in this example:</p>
  <pre><code>import pg
  
  pg.DB(*credentials)
  
  sql = &quot;select %s, %s from my.table limit 10&quot;
  c.query_formatted(sql, (&quot;id&quot;, &quot;event_time&quot;)).getresult()[0]
  </code></pre>
  <p>and trying to query a Redshift table.</p>
  <p>Unfortunately I get this error message</p>
  <pre><code>{InternalError}ERROR:  Assert
  DETAIL:  
    -----------------------------------------------
    error:  Assert
    code:      1000
    context:   false - Invalid type: 705
    query:     9876543
    location:  tbl_trans.hpp:923
    process:   padbmaster [pid=6543]
    -----------------------------------------------
  </code></pre>
  <p>which I really have no idea how to interpret.</p>
  <p>I also tried to query with another client</p>
  <pre><code>select *
  from stl_error
  where pid = 6543;
  </code></pre>
  <p>but all I get is:</p>
  <pre><code>userid,process,recordtime,pid,errcode,file,linenum,context,error
  100,padbmaster,2021-03-01 12:00:00,6543,1000,/home/ec2-user/padb/src/sys/tbl_trans.hpp,923,Assert,false - Invalid type: 705                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  </code></pre>
  <p>Anyone knows what's the problem here? Any other suggestion?</p>