当我运行这个 SQL 脚本时,我得到:
错误:无法确定用于字符串比较的排序规则
这是第 34 行的内容:
CREATE TEMPORARY TABLE weight_options AS
SELECT
io.lot_id
, io.vin
, map.fkey_style AS chrome_styleid
, SUM( CASE WHEN co.code = io.code THEN 1 ELSE 0 END ) AS exact_option
, SUM( CASE WHEN length(io.code) = 2 AND co.code LIKE io.code || '%' THEN 1 ELSE 0 END ) AS appx_option
, (
SUM( CASE WHEN co.code = io.code THEN 2 ELSE 0 END )
+ SUM( CASE WHEN length(io.code) = 2 AND co.code LIKE io.code || '%' THEN 1 ELSE 0 END )
) AS option_weight
FROM inventory.options AS io
-- options *must* have same index as inventory.vehicles
JOIN chrome_vinmatch_best_match AS vd
USING ( vin )
JOIN chrome_vinmatch.style AS map
ON ( vd.chrome_patternid = map.fkey_pattern )
JOIN chrome_nvd.options AS co
ON ( io.code = co.code AND map.fkey_style = co.fkey_style AND io.code IS NOT NULL )
GROUP BY io.lot_id, io.vin, map.fkey_style
;
我刚刚从安装迁移8.4.11
到安装9.1.3
使用pg_dump
.
在9.1.2 的发行说明中发现错误
所以我在那个文件中查找了
UPDATE
命令并找到了这些: