Skip to content

Fix Postgres query cells rendering as blanks - #25

Merged
pavi2410 merged 2 commits into
mainfrom
cursor/pg-query-decode-d094
Oct 3, 2026
Merged

pavi2410 merged 2 commits into
mainfrom
cursor/pg-query-decode-d094

Conversation

@pavi2410

@pavi2410 pavi2410 commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Problem

Postgres query-grid cells for integers, bools, timestamps, numeric, json, and uuid came back empty. The query path decoded every cell as String and turned a failed decode into "". The data viewer had its own try_get chain that still missed date/time types, so those rendered as the null sentinel.

Fix

One decoder in based-postgres (decode_pg_cell / pg_cell_display):

  • Query execute_sql and the data viewer both call it
  • Binary payloads are formatted by type (ints, floats, bool, text, bytea, date/time, numeric, json/jsonb, uuid)
  • Text-format values pass through as UTF-8
  • SQL NULL is NULL

No new UI. No sqlx feature flags or extra type crates — time is already a workspace/sqlx dependency.

Test

decode_pg_cell_shows_values_not_blanks feeds binary fixtures for the types that used to go blank and asserts readable values.

test decode::tests::decode_pg_cell_shows_values_not_blanks ... ok

Out of scope

Timeouts, statement splitting, row caps, SSL, SQLite.

Open in Web Open in Cursor 

The query path still decodes every cell as String (empty on failure).
This test pins the types that must render as readable values.

Co-authored-by: Pavitra Golchha <hello@pavi2410.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
based 3df6cec Commit Preview URL

Branch Preview URL
Oct 03 2026, 05:25 PM

Share one decoder between execute_sql and the data viewer so ints,
bools, timestamps, numeric, json, and uuid render as values, not blanks.

Co-authored-by: Pavitra Golchha <hello@pavi2410.com>
@pavi2410
pavi2410 marked this pull request as ready for review October 3, 2026 18:02
@pavi2410
pavi2410 merged commit 792096b into main Oct 3, 2026
3 checks passed
@pavi2410
pavi2410 deleted the cursor/pg-query-decode-d094 branch October 3, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants