Ability to work in streaming mode
Nobody has claimed this yet.
- Dominant language
- PLpgSQL
- Stars
- 2k
- Forks
- 121
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 7
Description
The binary always waits for the STDIN to be closed and than formats all supplied sql:
$ pg_format -
select * from companies;
select * from companies;
Ctrl+D
SELECT
*
FROM
companies;
SELECT
*
FROM
companies;
This restricts the ability to work in streaming mode.
Is it possible to format one SQL statement as long as it finishes (e.g. by ;)?
cat can be used as example as it triggers output on each line break
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the pg_format command's stdin handling and formatter entry point; no file or test is named in the issue. Reproduce the two-statement input shown, then verify output is emitted after each semicolon without waiting for EOF while preserving the existing formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, sql
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100