postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Docs issue - `onnotice: false` does not work

Open rhyst opened this issue 9 months ago • 1 comments

The docs state:

  onnotice             : fn,            // Default console.log, set false to silence NOTICE

However setting it to false did not silence the NOTICE logs for me, I had to to set to () => {}.


import getPostgres from "postgres";

...

export const postgres = getPostgres({
  database: config.database,
  host: config.databaseHost,
  port: config.databasePort,
  user: config.databaseUser,
  pass: config.databasePassword,
  onnotice: false, // did not work ?
  onnotice: () => {},
});

The typings are correct which do not allow a boolean value.

Apologies if I have misunderstood and this is not a bug.

Version 3.4.5.

rhyst avatar Apr 28 '25 19:04 rhyst

Came here to report this same issue. Setting onnotice to false as documented does not work, still appears to default to console.log.

syshriki9 avatar May 09 '25 01:05 syshriki9