title: sysdate and current_date have different types?
body: <p>The oracle docs for sysdate and current_date claim they both return DATEs:</p>
  
  <ul>
  <li><a href="http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions191.htm#SQLRF06124">sysdate</a></li>
  <li><a href="http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions044.htm#SQLRF00628">current_date</a></li>
  </ul>
  
  <p>This test, though:</p>
  
  <pre><code>alter session set plsql_warnings = 'ENABLE:ALL';
  create table test(x date);
  create or replace procedure test1 authid definer is
      cursor s is select x from test where current_date &gt; x;
  begin for x in s loop null; end loop; end;
  /
  show errors
  drop table test;
  drop procedure test1;
  </code></pre>
  
  <p>produces this output:</p>
  
  <pre><code>Errors for PROCEDURE TEST1:
  LINE/COL  ERROR
  3/42      PLW-07204: conversion away from column type may result in sub-optimal query plan
  </code></pre>
  
  <p>Using sysdate does not give the same warning. I suspect that substituting current_date for sysdate in queries runs a risk of altering the query plan, especially if the date columns are indexed.</p>
  
  <p>edit:</p>
  
  <pre><code>select dump(current_date) from dual;
  select dump(sysdate) from dual;
  </code></pre>
  
  <p>gives:</p>
  
  <pre><code>DUMP(CURRENT_DATE)
  Typ=13 Len=8: 223,7,7,9,11,23,55,0
  
  DUMP(SYSDATE)
  Typ=13 Len=8: 223,7,7,9,11,23,55,0
  </code></pre>