# postgres/postgres SLOC report

> As of 2026-09-21 (commit 9e17d25e79d4), postgres/postgres contains 3,205,371 total lines: 1,817,922 code, 931,501 comments, 455,948 blank, across 5,354 files in 30 languages (top: C 55.2%). Default configuration. Counted with tokei via OctoCounts.

postgres/postgres has 1,817,922 source lines of code out of 3,205,371 total lines across 5,354 files, counted from the master ref at commit 9e17d25e79d4 by the OctoCounts tokei engine on 2026-09-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving postgres/postgres to commit 9e17d25e79d4, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 56.7% of all lines, comments represent 29.1%, and the repository averages 340 code lines per file. C accounts for 55.2% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 1,617 | 1,603,966 | 1,003,286 | 408,355 | 192,325 |
| PO File | 467 | 966,464 | 409,419 | 372,413 | 184,632 |
| SQL | 853 | 195,690 | 137,202 | 26,200 | 32,288 |
| C Header | 1,014 | 206,048 | 119,698 | 67,477 | 18,873 |
| Perl | 407 | 106,162 | 73,448 | 17,514 | 15,200 |
| Happy | 11 | 27,803 | 24,839 | 0 | 2,964 |
| Meson | 307 | 16,525 | 12,923 | 1,336 | 2,266 |
| RPM Specfile | 173 | 14,026 | 10,375 | 2,082 | 1,569 |
| Makefile | 341 | 13,448 | 8,657 | 2,399 | 2,392 |
| Lex | 14 | 9,440 | 5,814 | 2,422 | 1,204 |
| Snakemake | 2 | 2,668 | 2,663 | 5 | 0 |
| XSL | 10 | 2,396 | 1,884 | 235 | 277 |

Top language (C 55.2%). Generated at 2026-09-21T01:47:32.312931337+00:00. Canonical report: https://octocounts.com/github/postgres/postgres

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/postgres/postgres/commit/9e17d25e79d4756be08b4a5521b4b58450217137?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Atrue%2C%22includeTests%22%3Atrue%2C%22includeGenerated%22%3Atrue%7D).

## Report FAQ

### How many lines of code does postgres/postgres have?

postgres/postgres has 3,205,371 total lines, including 1,817,922 code lines, 931,501 comment lines, and 455,948 blank lines.

### How was the postgres/postgres line count measured?

OctoCounts resolved the public GitHub repository to commit 9e17d25e79d4, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for postgres/postgres?

This OctoCounts report was generated from master at commit 9e17d25e79d4 on 2026-09-21T01:47:32.312931337+00:00.

## Similar repository reports

- [php/php-src](https://octocounts.com/github/php/php-src) — C, 1,793,289 code lines
- [plan9foundation/plan9](https://octocounts.com/github/plan9foundation/plan9) — C, 1,659,936 code lines
- [FFmpeg/FFmpeg](https://octocounts.com/github/FFmpeg/FFmpeg) — C, 1,628,496 code lines
- [python/cpython](https://octocounts.com/github/python/cpython) — C, 1,627,455 code lines
- [libretro/retroarch](https://octocounts.com/github/libretro/retroarch) — C, 2,023,550 code lines
- [tsirysndr/rockbox-zig](https://octocounts.com/github/tsirysndr/rockbox-zig) — C, 2,061,816 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
