時(shí)間:2024-02-09 10:40作者:下載吧人氣:16
PostgreSQL是一個(gè)強(qiáng)類型數(shù)據(jù)庫(kù),因此你輸入的變量、常量是什么類型,是強(qiáng)綁定的,例如
在調(diào)用操作符時(shí),需要通過(guò)操作符邊上的數(shù)據(jù)類型,選擇對(duì)應(yīng)的操作符。
在調(diào)用函數(shù)時(shí),需要根據(jù)輸入的類型,選擇對(duì)應(yīng)的函數(shù)。
如果類型不匹配,就會(huì)報(bào)操作符不存在,或者函數(shù)不存在的錯(cuò)誤。
postgres=# select ‘1’ + ‘1’;
ERROR: operator is not unique: unknown + unknown
LINE 1: select ‘1’ + ‘1’;
^
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
網(wǎng)友評(píng)論