Skip to content

Commit 315a73d

Browse files
committed
Minor bugfix and make fetch_statentries_for_relation to be accesible by extensions.
1 parent 0bbcb3a commit 315a73d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/backend/statistics/extended_stats.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ typedef struct StatExtEntry
7575
} StatExtEntry;
7676

7777

78-
static List *fetch_statentries_for_relation(Relation pg_statext, Oid relid);
7978
static VacAttrStats **lookup_var_attr_stats(Relation rel, Bitmapset *attrs, List *exprs,
8079
int nvacatts, VacAttrStats **vacatts);
8180
static void statext_store(Oid statOid, bool inh,
@@ -420,7 +419,7 @@ statext_is_kind_built(HeapTuple htup, char type)
420419
/*
421420
* Return a list (of StatExtEntry) of statistics objects for the given relation.
422421
*/
423-
static List *
422+
List *
424423
fetch_statentries_for_relation(Relation pg_statext, Oid relid)
425424
{
426425
SysScanDesc scan;

src/backend/utils/cache/typcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ lookup_type_cache(Oid type_id, int flags)
468468

469469
tp = SearchSysCache1(TYPEOID, ObjectIdGetDatum(type_id));
470470
if (!HeapTupleIsValid(tp))
471-
ereport(PANIC,
471+
ereport(ERROR,
472472
(errcode(ERRCODE_UNDEFINED_OBJECT),
473473
errmsg("type with OID %u does not exist", type_id)));
474474
typtup = (Form_pg_type) GETSTRUCT(tp);

src/include/statistics/statistics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ extern MVNDistinct *statext_ndistinct_load(Oid mvoid, bool inh);
101101
extern MVDependencies *statext_dependencies_load(Oid mvoid, bool inh);
102102
extern MCVList *statext_mcv_load(Oid mvoid, bool inh);
103103

104+
extern List *fetch_statentries_for_relation(Relation pg_statext, Oid relid);
104105
extern void BuildRelationExtStatistics(Relation onerel, bool inh, double totalrows,
105106
int numrows, HeapTuple *rows,
106107
int natts, VacAttrStats **vacattrstats);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy