mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:50:20 +08:00
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:
@ -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;
|
||||||
|
Reference in New Issue
Block a user