L'exécution de type cast fonctions postgresql 9.1.3 n'est pas la même que dans postgresql 8.2.22. Concaténation ne fonctionne pas correctement

J'ai été en utilisant la version de postgresql 8.2.22, puis j'ai mis à niveau vers postgresql 9.1.3 et la mise à jour a été effectuée avec succès.

Mais maintenant, certaines distributions ne sont pas le même comme avant!

Dans Postgres 8.2.22

J'exécute ces deux requêtes et ils fonctionnent correctement:

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)

Après la mise à Postgres 9.1.3

- Je exécuter les mêmes requêtes et maintenant ils jettent des erreurs:

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

Pourquoi est-ce que la coulée dans postgresql ne fonctionne pas comme il le faisait avant?

OriginalL'auteur RSK | 2012-08-17