[@types/pg] functions `escapeLiteral` and `escapeIdentifier` missing from base `"pg"` module

Author: RalphORamaCreated Dec 31, 2023Updated Jul 1, 2026

@types/pg has type detentions for escapeLiteral and escapeIdentifier on the ClientBase object, but not exported from the base pg module.

The pg docs recommend importing these functions directly from pg. Additionally, the pg source code states:

  // escapeIdentifier and escapeLiteral moved to utility functions & exported
  // on PG
  // re-exported here for backwards compatibility

Source: DefinitelyTyped/DefinitelyTyped