在postgresql中我在本地查询数据时
以下语句在本地是可以查出来数据的,name是字符串类型 ↓
select *from table_name where a.name is not null and a.name !=''
但在服务器数据库确查不出来数据,服务器中执行以下语句才可以 ↓,执行上面的语句则查不到数据
select *from table_name where a.name is not null
而且在服务器数据库中我使用,更新语句把name设为''时(空字符串时),也设置不了,变成null了 ↓
update table_name set name='' where id ='a0057e84b3e34cbfb7109afb496f417e'
在本地数据库里是可以设置空字符串成功
本地数据库的建表语句中 "name" varchar(255) COLLATE "pg_catalog"."default" DEFAULT NULL,
服务器数据库建表语句中 name varchar(255) DEFAULT NULL::character varying,
两个数据库版本不一样
服务器的 PostgreSQL 9.2.4 (GaussDB A 8.0.0 build ebc292fe) compiled at 2020-08-20 22:36:12 commit 7766 last mr 13176 on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 5.4.0, 64-bit
本地的 PostgreSQL 9.5.22, compiled by Visual C++ build 1800, 64-bit
请问这是什么原因???