Skip to content

Use pgcli options in the pgcli passthrough example - #57

Open
puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/pgcli-help-example
Open

puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/pgcli-help-example

Conversation

@puncsky

@puncsky puncsky commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary

The render pgcli --help example passes --csv -q through to pgcli, but those are psql options. Real pgcli rejects them before connecting:

Error: No such option '--csv'. Did you mean '--dsn'?

This replaces the example with --single-connection --less-chatty, two options pgcli accepts. The psql example keeps --csv -q, which is valid for psql. The -- passthrough itself is unchanged.

Motivation

Copying the documented example fails immediately, even with a healthy database.

How to verify

  • render pgcli --help shows the new example.
  • With pgcli 4.6.0: pgcli --single-connection --less-chatty -h 127.0.0.1 -p 1 ... gets past option parsing (it reaches connection failed: ... Connection refused), while pgcli --csv -q ... fails with No such option '--csv'.
  • The same options passed through pgcli <db> -- --single-connection --less-chatty opened a working session in manual testing.

Release notes

N/A

The `render pgcli --help` example passed `--csv -q` through to pgcli, but
those are psql options: pgcli rejects them with "No such option '--csv'",
so copying the example fails before any connection is made. Use
`--single-connection --less-chatty`, which pgcli accepts. The psql example
keeps `--csv -q`, which is valid there.
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.

1 participant