pgweb icon indicating copy to clipboard operation
pgweb copied to clipboard

No execution time on `No records found` requests.

Open Quake4 opened this issue 1 year ago • 2 comments

image

Quake4 avatar Oct 08 '24 12:10 Quake4

It is necessary to show the execution time, why is it hidden? A query that does not return a result is the same query as the others with the result. It is unclear why to hide the execution time.

Quake4 avatar Oct 08 '24 12:10 Quake4

its trivial app.js: buildTable

  if (results.rows.length == 0) {
    $("#results_header").html("");
    $("#results_body").html("<tr><td>No records found</td></tr>");
    $("#result-rows-count").html("");
    $("#results").addClass("empty");
    if (results.stats)
      $("#result-rows-count").html(results.stats.query_duration_ms + " ms");
    return;
  }

Quake4 avatar Oct 09 '24 09:10 Quake4

If it's so trivial, why don't you open up a proper PR with the change you'd like to see?

sosedoff avatar Nov 02 '24 16:11 sosedoff

https://github.com/sosedoff/pgweb/pull/763

I was answering goblin's stupid questions, and he withdrew himself.

Quake4 avatar Nov 09 '24 16:11 Quake4

Closing the issue since the requested change has been implemented and merged into main.

sosedoff avatar Dec 15 '24 23:12 sosedoff