title: Executing type cast functions in postgresql 9.1.3 is not the same as in postgresql 8.2.22. Concatenation is not working correctly
body: <p>I was using postgresql version 8.2.22, then I upgraded to postgresql 9.1.3 and the upgrade was successfully completed. </p>
  
  <p>But now some casts are not working the same as before!</p>
  
  <p><strong>In Postgres 8.2.22</strong></p>
  
  <p>I run these two queries and they both work correctly:</p>
  
  <pre><code>POSTGRES8222=# select TO_NUMBER('12345678',9999999999.99);
  
  to_number
  =========   
   12345678
  (1 row)
  
  POSTGRES8222=# select a ||'$'|| b from test;
   ?column?
  ----------
   1$abcdef
   2$ghijkl
   3$3456
  (3 rows)
  </code></pre>
  
  <p><strong>After upgrade to Postgres 9.1.3</strong></p>
  
  <p>I run the same queries and now they throw errors:</p>
  
  <pre><code>select TO_NUMBER('12345678',9999999999.99);
  
  ERROR:  function to_number(unknown, numeric) does not exist
  LINE 1: select TO_NUMBER('12345678',9999999999.99);
                 ^
  HINT:  No function matches the given name and argument types. You might 
  need to add explicit type casts.
  
  EXCEPTION
  org.postgresql.util.PSQLException: ERROR: function to_number(numeric, numeric) 
  does not exist
  
  Hint: No function matches the given name and argument types. You might need 
  to add explicit type casts.
  
  Position: 150
  
  
  
  select a ||'$'|| b from test;
  ERROR:  operator is not unique: numeric || unknown
  LINE 1: select a ||'$'|| b from test;
                   ^
  HINT:  Could not choose a best candidate operator. You might need to 
  add explicit type casts.
  
  ********** Error **********
  ERROR: operator is not unique: numeric || unknown
  SQL state: 42725
  Hint: Could not choose a best candidate operator. You might need to  
  add explicit type casts.
  Character: 10
  </code></pre>
  
  <p>Why is it that casting in postgresql is not working as it did before?</p>