StatisticsObjIsVisibleExt lacks "do not look in temp namespace"

Started by Noah Mischabout 1 year ago2 messageshackers
Jump to latest
#1Noah Misch
noah@leadboat.com

StatisticsObjIsVisibleExt() lacks the "do not look in temp namespace" code of
the rest of the non-relation, non-type namespace searches. Patch attached.
See its log messages for the consequences.

Incidentally, stats on temp tables do default to a permanent schema. That
seems fine, though:

set search_path = public;
CREATE TEMP TABLE ab1 (a INTEGER, b INTEGER, c INTEGER);
CREATE STATISTICS s ON a, b FROM ab1; -- creates public.s
\dX *.*

Attachments:

stats-ext-visible-v1.patchtext/plain; charset=us-asciiDownload+25-0
#2Nathan Bossart
nathandbossart@gmail.com
In reply to: Noah Misch (#1)
Re: StatisticsObjIsVisibleExt lacks "do not look in temp namespace"

On Sat, Sep 20, 2025 at 09:21:16AM -0700, Noah Misch wrote:

StatisticsObjIsVisibleExt() lacks the "do not look in temp namespace" code of
the rest of the non-relation, non-type namespace searches. Patch attached.

LGTM

--
nathan