Type parsing for node-postgres, used by importing it via `require('pg').types`. It converts raw PostgreSQL text results into JavaScript types, and is useful for customizing how specific PostgreSQL data types are parsed (for example, overriding type parsers for certain OIDs).
Project status
- Actively maintained, with a recent upstream push on 2025-07-30 and a corresponding new version (v4.1.0) that updated the core built-in type OID mappings and regenerated TypeScript definitions.
- Apparent update cadence is low but ongoing, roughly yearly (v4.0.1 in 2023-02, v4.0.2 in 2024-01, v4.1.0 in 2025-07), suggesting a maintenance track with periodic updates rather than frequent releases.
AI summary generated Today
Recent updates
v4.1.0
10 months agoRelease v4.1.0 primarily expands and refactors the PostgreSQL builtin type OID mappings used by the library, including regenerating the TypeScript definitions from a new generator. Release notes were not provided, so changes below reflect what the diff shows in code and type declarations.
BreakingFeaturesv4.0.2
1/22/2024This release (v4.0.2) makes a minimal change to the package metadata and updates a single dependency version. No release notes were provided, so the effective change is entirely from the code diff.
v4.0.1
2/15/2023Release v4.0.1 was published on 2023-02-15, but the publisher did not provide any release notes. As a result, there is no documented information about new features, bug fixes, breaking changes, security updates, or migration requirements for this version.
v4.0.0
1/31/2022Release v4.0.0 refactors the type parsing layer, significantly updating timestamp/date parsing logic and adding support for PostgreSQL range types (via postgres-range). It also introduces stricter runtime validation for setTypeParser inputs and upgrades multiple dependencies, alongside raising the supported Node.js engine version. No release notes were provided to document these behavioral changes.
BreakingFeaturesv3.0.1
8/4/2020v3.0.1 does not include published release notes. The code diff shows primarily TypeScript declaration changes (and corresponding test typing updates) plus a dependency bump (postgres-bytea).
v3.0.0
11/12/2019v3.0.0 is a major refactor of pg-types type parsing, including changes to both the runtime parsers and the TypeScript type declarations. Release notes were not provided, but the code diff shows significant behavior changes, especially around numeric parsing and array handling.
v2.2.0
8/7/2019Release v2.2.0 introduces TypeScript typings for pg-types, including new exported type constructs and helper signatures. The release also updates the test setup to run tsd (type assertion tests) in addition to the existing tape tests.
Featuresv2.1.0
7/5/2019v2.1.0 introduces a new built-in type OID mapping exported as types.builtins, along with a README update showing how to use it. There are no other code changes visible in the provided diff.
Featuresv2.0.1
4/4/2019Release v2.0.1 makes a small change to the package version and bumps the postgres-date dependency. The only other change is a test fixture update around millisecond formatting in interval parsing.
v2.0.0
1/8/2019Release v2.0.0 was published on 2019-01-08, but no release notes were provided by the publisher. As a result, there is no documented information about new features, bug fixes, breaking changes, or other upgrade considerations in the available release data.