mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Return NULL for checksum failures if checksums are not enabled
Returning 0 could falsely indicate that there is no problem. NULL correctly indicates that there is no information about potential problems. Also return 0 as numbackends instead of NULL for shared objects (as no connection can be made to a shared object only). Author: Julien Rouhaud <rjuju123@gmail.com> Reviewed-by: Robert Treat <rob@xzilla.net>
This commit is contained in:
@ -1806,7 +1806,7 @@ pg_stat_bgwriter| SELECT pg_stat_get_bgwriter_timed_checkpoints() AS checkpoints
|
||||
pg_stat_database| SELECT d.oid AS datid,
|
||||
d.datname,
|
||||
CASE
|
||||
WHEN (d.oid = (0)::oid) THEN NULL::integer
|
||||
WHEN (d.oid = (0)::oid) THEN 0
|
||||
ELSE pg_stat_get_db_numbackends(d.oid)
|
||||
END AS numbackends,
|
||||
pg_stat_get_db_xact_commit(d.oid) AS xact_commit,
|
||||
|
Reference in New Issue
Block a user