You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(_orm.Ado.ExecuteScalar(CommandType.Text,string.Format($" select 1 from {pg_}tables a inner join {pg_}namespace b on b.nspname = a.schemaname where b.nspname || '.' || a.tablename = '{{0}}.{{1}}'",tbname))==null)
194
+
if(_orm.Ado.ExecuteScalar(CommandType.Text,string.Format($" select 1 from {pg_}tables a inner join {pg_}namespace b on b.nspname = a.schemaname where b.nspname ='{{0}}' && a.tablename = '{{1}}'",tbname))==null)//原判断V9版本存在问题
186
195
{//表不存在
187
196
if(tboldname!=null)
188
197
{
189
-
if(_orm.Ado.ExecuteScalar(CommandType.Text,string.Format($" select 1 from {pg_}tables a inner join {pg_}namespace b on b.nspname = a.schemaname where b.nspname || '.' || a.tablename = '{{0}}.{{1}}'",tboldname))==null)
198
+
if(_orm.Ado.ExecuteScalar(CommandType.Text,string.Format($" select 1 from {pg_}tables a inner join {pg_}namespace b on b.nspname = a.schemaname where b.nspname ='{{0}}' && a.tablename = '{{1}}'",tboldname))==null)
190
199
//旧表不存在
191
200
tboldname=null;
192
201
}
@@ -388,7 +397,7 @@ d.description as comment
388
397
inner join {pg_}namespace b on b.oid = a.relnamespace
389
398
left join {pg_}description d on d.objoid = a.oid and objsubid = 0
390
399
where upper(b.nspname) not in ('SYS_CATALOG', 'INFORMATION_SCHEMA', 'TOPOLOGY', 'SYSAUDIT', 'SYSLOGICAL', 'SYS_TEMP_1', 'SYS_TOAST', 'SYS_TOAST_TEMP_1', 'XLOG_RECORD_READ') and a.relkind in ('r') and b.nspname = {{0}} and a.relname = {{1}}
391
-
and upper(b.nspname || '.' || a.relname) not in ('PUBLIC.GEOGRAPHY_COLUMNS','PUBLIC.GEOMETRY_COLUMNS','PUBLIC.RASTER_COLUMNS','PUBLIC.RASTER_OVERVIEWS')",tbname[0],tbname[1])));
400
+
and upper(text(b.nspname || '.' || a.relname)) not in ('PUBLIC.GEOGRAPHY_COLUMNS','PUBLIC.GEOMETRY_COLUMNS','PUBLIC.RASTER_COLUMNS','PUBLIC.RASTER_OVERVIEWS')",tbname[0],tbname[1])));//解决报错 function upper(boolean) is not unique 错误的问题
392
401
if(dbcomment!=(tb.Comment??""))
393
402
sbalter.Append("COMMENT ON TABLE ").Append(_commonUtils.QuoteSqlName($"{tbname[0]}.{tbname[1]}")).Append(" IS ").Append(_commonUtils.FormatSql("{0}",tb.Comment)).Append(";\r\n");
0 commit comments