Parent
Part of #414
Problem
injectSqlLimit only helps when the user SQL has no LIMIT. The postgres driver still returns a fully buffered Result. UI then caps displayed rows, but peak allocation already happened.
Huge user LIMIT, multi-statement paths, or inject misses → large Dart buffers.
Evidence
lib/core/database/postgres_connection.dart (execute → Result)
lib/features/postgresql/postgres_sql_workspace.dart (~308–365)
lib/core/database/postgres_sql.dart (injectSqlLimit)
Related
#184 closed after LIMIT injection; this is the remaining buffering gap. MySQL SQL workspace already uses rowsStream as the target shape.
Acceptance
Suggested fix
Clamp existing LIMIT to _resultMaxRows; use portal / stream fetch; avoid holding full Result when only N rows are shown.
Parent
Part of #414
Problem
injectSqlLimitonly helps when the user SQL has noLIMIT. Thepostgresdriver still returns a fully bufferedResult. UI then caps displayed rows, but peak allocation already happened.Huge user
LIMIT, multi-statement paths, or inject misses → large Dart buffers.Evidence
lib/core/database/postgres_connection.dart(execute →Result)lib/features/postgresql/postgres_sql_workspace.dart(~308–365)lib/core/database/postgres_sql.dart(injectSqlLimit)Related
#184 closed after LIMIT injection; this is the remaining buffering gap. MySQL SQL workspace already uses
rowsStreamas the target shape.Acceptance
LIMITlarger than cap is clamped (or streamed and stopped at cap)Suggested fix
Clamp existing LIMIT to
_resultMaxRows; use portal / stream fetch; avoid holding fullResultwhen only N rows are shown.