darold / darold/pgFormatter

Formatting Help (Potential Feature Request)

Open
#308 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PLpgSQL
Stars
2k
Forks
121
Avg merge
4d 21h
Merged PRs (30d)
7

Description

Can I use pgFormatter to get this query

SELECT
    username,
    first_name,
    last_name,
    start_of_employment,
    end_of_employment
FROM
    employees
WHERE
    username IN ('tcbgpF46JJ', '5m6PFQ60Gd', 'z7vz3WJH6E', 'S5JPy48rLI', 'bKj3C-z1UI', 'NOEiCNJkQs', 'sz7NM-iBLQ', 'M4iYaA95UA', 'IvKVsadzDR', 'L1C3SGBwrp', 'aOYXq_JEkK', '8hv1.zDxcT', 'WRg8XIM_xJ', 'tdisducrdm', '6xWZqWNVZJ', 'oyxLJwKGlp', 'Tt6dkxMA4i', '4BsM0ux905', 'j8TJIq50fX', 'Bc9Q_eVIK1', 'd0TpJrv-5y')
ORDER BY
    start_of_employment;

To look something like

SELECT
    username,
    first_name,
    last_name,
    start_of_employment,
    end_of_employment
FROM
    employees
WHERE
    username IN (
      'tcbgpF46JJ',
      '5m6PFQ60Gd',
      'z7vz3WJH6E',
      'S5JPy48rLI',
      'bKj3C-z1UI',
      'NOEiCNJkQs',
      'sz7NM-iBLQ',
      'M4iYaA95UA',
      'IvKVsadzDR',
      'L1C3SGBwrp',
      'aOYXq_JEkK',
      '8hv1.zDxcT',
      'WRg8XIM_xJ',
      'tdisducrdm',
      '6xWZqWNVZJ',
      'oyxLJwKGlp',
      'Tt6dkxMA4i',
      '4BsM0ux905',
      'j8TJIq50fX',
      'Bc9Q_eVIK1',
      'd0TpJrv-5y'
    )
ORDER BY
    start_of_employment;

I can't determine if there is a flag I am using inappropriately.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the SQL input with pgFormatter and compare its output with the requested formatting. Check the formatter's documented options and command-line help for an IN-list indentation setting; done means confirming whether an existing flag produces the example or clarifying the requested behavior if none does.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, sql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.