diff options
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
-rw-r--r-- | src/backend/utils/adt/pgstatfuncs.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index f162381745c..3e4faea4746 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/pgstatfuncs.c,v 1.46 2007/09/25 20:03:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/pgstatfuncs.c,v 1.47 2007/11/15 21:14:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -190,32 +190,32 @@ pg_stat_get_tuples_hot_updated(PG_FUNCTION_ARGS) Datum pg_stat_get_live_tuples(PG_FUNCTION_ARGS) -{ - Oid relid = PG_GETARG_OID(0); - int64 result; - PgStat_StatTabEntry *tabentry; - +{ + Oid relid = PG_GETARG_OID(0); + int64 result; + PgStat_StatTabEntry *tabentry; + if ((tabentry = pgstat_fetch_stat_tabentry(relid)) == NULL) result = 0; else result = (int64) (tabentry->n_live_tuples); - + PG_RETURN_INT64(result); } - + Datum pg_stat_get_dead_tuples(PG_FUNCTION_ARGS) { - Oid relid = PG_GETARG_OID(0); - int64 result; - PgStat_StatTabEntry *tabentry; + Oid relid = PG_GETARG_OID(0); + int64 result; + PgStat_StatTabEntry *tabentry; if ((tabentry = pgstat_fetch_stat_tabentry(relid)) == NULL) result = 0; else result = (int64) (tabentry->n_dead_tuples); - + PG_RETURN_INT64(result); } |