Cast reltuples column to bigint so it does not return a float with an exponent. See http://www.heidisql.com/forum.php?t=17959

This commit is contained in:
Ansgar Becker
2015-03-19 17:47:35 +00:00
parent d975065cef
commit 0ecfca3215

View File

@ -4946,7 +4946,7 @@ begin
ngMSSQL: ngMSSQL:
RowsTotal := MakeInt(DBObject.Connection.GetVar('SELECT SUM(rows) FROM sys.partitions WHERE index_id IN (0, 1) AND object_id = object_id('+esc(DBObject.Database+'.'+DBObject.Schema+'.'+DBObject.Name)+')')); RowsTotal := MakeInt(DBObject.Connection.GetVar('SELECT SUM(rows) FROM sys.partitions WHERE index_id IN (0, 1) AND object_id = object_id('+esc(DBObject.Database+'.'+DBObject.Schema+'.'+DBObject.Name)+')'));
ngPgSQL: ngPgSQL:
RowsTotal := MakeInt(DBObject.Connection.GetVar('SELECT reltuples FROM pg_class AS c LEFT JOIN pg_namespace AS n ON (n.oid = c.relnamespace) WHERE c.relkind='+esc('r')+' AND n.nspname='+esc(DBObject.Database)+' AND c.relname='+esc(DBObject.Name))); RowsTotal := MakeInt(DBObject.Connection.GetVar('SELECT reltuples::bigint FROM pg_class AS c LEFT JOIN pg_namespace AS n ON (n.oid = c.relnamespace) WHERE c.relkind='+esc('r')+' AND n.nspname='+esc(DBObject.Database)+' AND c.relname='+esc(DBObject.Name)));
else else
raise Exception.Create(MsgUnhandledNetType); raise Exception.Create(MsgUnhandledNetType);
end; end;