mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-04 23:39:31 +08:00
Update pgsql
This commit is contained in:
parent
b4d44ce7b5
commit
c62d9ae82f
@ -254,14 +254,8 @@ namespace SqlSugar
|
||||
{
|
||||
if (isCache == false)
|
||||
{
|
||||
var sql = @"select 1 from pg_class c
|
||||
inner join
|
||||
pg_namespace n on n.oid = c.relnamespace and nspname='"+GetSchema()+@"'
|
||||
inner join
|
||||
pg_tables z on z.tablename=c.relname and Lower(z.tablename)='" + tableName.ToLower()+@"'
|
||||
where relkind in('p', 'r') and relname not like 'pg\_%' and relname not like 'sql\_%' and schemaname='public' order by relname";
|
||||
var isAny=this.Context.Ado.GetDataTable(sql).Rows.Count>0;
|
||||
return isAny;
|
||||
var sql = $" SELECT 1 FROM pg_catalog.pg_tables \r\n WHERE schemaname = '"+GetSchema()+ "' \r\n AND Lower(tablename) = '" + tableName.ToLower()+"' ";
|
||||
return this.Context.Ado.GetInt(sql) > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user