Skip to content

SELECT on table with bytea column hangs when executed as single statement #161

@AlexZeitler

Description

@AlexZeitler

Description

Running a SELECT * on a table containing a bytea column hangs indefinitely (spinner runs, must quit with :q or ESC) when executed as the only statement.

Running the same statement together with another statement works fine.

Steps to reproduce

  1. Connect to a PostgreSQL 17 database
  2. Run the setup SQL below
  3. Execute SELECT * FROM bytea_repro; as single statement → hangs (spinner, quit with :q or ESC)
  4. Execute SELECT id, name FROM bytea_repro; as single statement → works
  5. Execute both together → works

Setup SQL

CREATE TABLE IF NOT EXISTS bytea_repro (
  id serial PRIMARY KEY,
  name varchar(100),
  binary_data bytea
);

INSERT INTO bytea_repro (name, binary_data) VALUES
  ('row1', decode('48656c6c6f', 'hex')),
  ('row2', decode('deadbeef', 'hex')),
  ('row3', decode('cafebabe', 'hex'));

Expected behavior

Query returns 3 rows immediately.

Actual behavior

sqlit shows a spinner indefinitely. Must be quit with :q or ESC.

Environment

  • sqlit-tui: 1.3.1.1 (installed via pipx)
  • PostgreSQL: 17
  • OS: Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions