Content-Length: 263336 | pFad | http://github.com/postgrespro/postgres/commit/ab5e48f153cfea2c571dc177ae96faf4ab072b8e

3C Replace magic constants used in pg_stat_get_replication_slot(). · postgrespro/postgres@ab5e48f · GitHub
Skip to content

Commit ab5e48f

Browse files
author
Amit Kapila
committed
Replace magic constants used in pg_stat_get_replication_slot().
A few variables have been using 10 as a magic constant while PG_STAT_GET_REPLICATION_SLOT_COLS can be used instead. Author: Masahiko Sawada Reviewed-By: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/CAD21AoBvqODDfmD17DkEuPCvV2KbruukXQ2Vwrv5Xi-TsAsTJA@mail.gmail.com
1 parent 52d26d5 commit ab5e48f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/pgstatfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,8 +2317,8 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
23172317
text *slotname_text = PG_GETARG_TEXT_P(0);
23182318
NameData slotname;
23192319
TupleDesc tupdesc;
2320-
Datum values[10];
2321-
bool nulls[10];
2320+
Datum values[PG_STAT_GET_REPLICATION_SLOT_COLS];
2321+
bool nulls[PG_STAT_GET_REPLICATION_SLOT_COLS];
23222322
PgStat_StatReplSlotEntry *slotent;
23232323
PgStat_StatReplSlotEntry allzero;
23242324

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/ab5e48f153cfea2c571dc177ae96faf4ab072b8e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy