xataio / xataio/learn-postgres
Shell: \d PATTERN describes instead of listing relations
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 7
- Forks
- 1
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 36
Description
Symptom
Help text documents \d[+] [PATTERN] with * / ? wildcards for listing relations. Any non-empty argument takes the describe path ('::regclass'), so pattern forms fail with “relation does not exist” instead of listing.
Examples:
\d user*— should list matching relations; currently describe\d *— same\dt user*— correctly lists (control)
Exact names like \d users should still describe.
Red loop (already run)
import { expandMeta } from './components/shell/meta.ts';
expandMeta('\\d user*').kind; // got "describe", expect "query"
expandMeta('\\dt user*').kind; // "query" (ok)
Where
components/shell/meta.ts—case "\\d": anyarg→kind: "describe"; no pattern vs name branch- Help copy in the same file advertises PATTERN support
Notes
Diagnosed with /diagnosing-bugs. Fix should treat args containing * / ? (and possibly bare patterns) as list queries, matching \dt / \dv behaviour.
Contributor guide
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
Start in components/shell/meta.ts at the case "\d" branch and inspect expandMeta, comparing it with the \dt and \dv handling. Re-run the supplied expandMeta examples, then verify that wildcard arguments produce query behavior, exact names still produce describe behavior, and the existing \dt behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, typescript
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100