postgresql バージョン 8.2.22 を使用していましたが、postgresql 9.1.3 にアップグレードすると、アップグレードは正常に完了しました。
しかし今、一部のキャストは以前と同じように機能していません!
Postgres 8.2.22 では
次の 2 つのクエリを実行すると、どちらも正しく動作します。
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)
Postgres 9.1.3 へのアップグレード後
同じクエリを実行すると、エラーがスローされます。
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
postgresql でのキャストが以前のように機能しないのはなぜですか?