我有一個查詢Postgres的柱鑄造
SELECT assetid, type_code, version, name, short_name, status, languages,
charset, force_secure, created, created_userid, updated, updated_userid,
published, published_userid, status_changed, status_changed_userid
FROM sq_ast WHERE assetid = 7
不工作,並拋出
ERROR: operator does not exist: character varying = integer LINE 4: FROM sq_ast WHERE assetid = 7
我可以讓它做
SELECT assetid, type_code, version, name, short_name, status, languages,
charset, force_secure, created, created_userid, updated, updated_userid,
published, published_userid, status_changed, status_changed_userid
FROM sq_ast WHERE assetid = '7'
工作,請注意報價WHERE子句中的7 ...
我正在部署一個巨大的應用程序,我不能改寫核心...同樣我不想冒險改變列的類型...
我不是Postgres專家...請幫助.. 。
是否有嚴格鑄造柱的選項?
哪個PostgreSQL版本?一個快速測試表明8.4允許這樣做。 – araqnid 2010-05-18 19:17:57