public inbox for [email protected]
help / color / mirror / Atom feedFrom: Corey Huinker <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: Sami Imseih <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump
Date: Mon, 16 Mar 2026 16:04:23 -0400
Message-ID: <CADkLM=cuwGZU0i51vn+SUqptXB8QT8rhRRYshns+pX0KxczmAQ@mail.gmail.com> (raw)
In-Reply-To: <abhXqx-xffsknv3B@nathan>
References: <aa81xZp421DSkHiW@nathan>
<CADkLM=dhYeJtP+8h8k4ULCu-P1pNHmFyDFBm8B0WU6A6i+NgPQ@mail.gmail.com>
<abBIu0lYyFYAq5fx@nathan>
<CADkLM=d-=_hbOUsMc4u_ScLmSNox6EbzFCmaMn7MTh6f_SLU_A@mail.gmail.com>
<CADkLM=d-yUR8JsM-UmCfeRAhVj+X9MYi0kz9=zQO4EoBkd8H8A@mail.gmail.com>
<CAA5RZ0tiL01rYm7=WaDGLUYjvz+fQRqmaXyRUv9jKRnR3_6xDQ@mail.gmail.com>
<CADkLM=fn=RmBD0-h+yjTxhpLtbK9s_QdvT-HsGtUj+-1N=6s0g@mail.gmail.com>
<CAA5RZ0sf7vYav+Q5GwxGikBZSYUm+4haA5bHC0N67ct570HLcg@mail.gmail.com>
<abRugSlNTmW0-9Um@nathan>
<CADkLM=cfpFMpgOGPEyr7U+-Cxzvukap-_s8p-ijMTyRphP=oeg@mail.gmail.com>
<abhXqx-xffsknv3B@nathan>
>
>
> > CREATE VIEW pg_stats_ext_exprs WITH (security_barrier) AS
> > SELECT cn.nspname AS schemaname,
> > c.relname AS tablename,
> > + s.stxrelid AS tableid,
> > sn.nspname AS statistics_schemaname,
> > s.stxname AS statistics_name,
> > + s.oid AS statid,
> > pg_get_userbyid(s.stxowner) AS statistics_owner,
> > - stat.expr,
> > + expr.expr,
> > + 0 - expr.ordinality AS expr_attnum,
>
> I left the expr_attnum stuff out. It seems to make this patch quite large
> and complicated, we don't plan to use it for the pg_dump patch, and I'm not
> sure about showing users a "synthetic attnum" that seems to have no other
> point of reference. Would this information be useful in pg_dump somewhere?
> I'm curious to hear more about the intent.
>
expr_attnum was something that Michael Paquier had lamented that the view
didn't have. There is obviously no present need for it, as pg_dump isn't
being modified for extended stats at all.
> I didn't see much value in adding attnum here given the size of the changes
> to the expected output it produces.
>
Same reasons for putting that in - people had lamented that we couldn't
order the dump by attnum, and ordering by attname feels weird somehow.
Again, we don't presently need it.
view thread (36+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump
In-Reply-To: <CADkLM=cuwGZU0i51vn+SUqptXB8QT8rhRRYshns+pX0KxczmAQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox