PostgresQL 字符串隐式转换JSON脚本: -- 隐式将varchar转换为json CREATE OR REPLACE FUNCTION json_in_varchar(varchar) RETURNS json AS $$ SELECT json_in($1::cstring); $$ LANGUAGE SQL IMMUTABLE; DROP CAST IF EXISTS (varchar as json); CREATE CAST (varchar AS json) WITH FU…
select * from (select * from ud_order where user_id=10 and status=2unionselect * from ud_order where user_id=0 and status=2 and order_info->'orderContact'->>'email' = '222@163.com') a where 1=1 select * from ud_order where (user_id=10 and status=…