Re: Extended Statistics set/restore/clear functions. - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Extended Statistics set/restore/clear functions.
Date
Msg-id CADkLM=eGwDZX9DQ_GouzqjMG7x_kCedBS6br2SciJ3wjwivfZg@mail.gmail.com
Whole thread Raw
In response to Re: Extended Statistics set/restore/clear functions.  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Extended Statistics set/restore/clear functions.
List pgsql-hackers
Another thing that may be worth doing is pushing the names of the keys
and some its the JSON meta-data shaping the object into a new header
than can be loaded by both the backend and the frontend.  It would be
nice to not hardcode this knowledge in a bunch of places if we finish
by renaming these attributes.

It may not be quite what you wanted, but the attribute names are now static constants in the new adt c files. It's possible/probable that you wanted them in some header file, but so far I haven't had to create any new header files, but that can be done if desired.

Yeah, right.  Thanks.  The parsing pieces seem like pieces worth their
own file.

That's done in the 0008-0009 patches. If I was starting from scratch, I would have moved the pre-existing in/out/send/recv functions to their own files in their own patches before changing the output format, but tacked on at the end like they are it's easier to see what the changes were, and the patches will probably get squashed together anyway.


> The functions in question are needed because the exprs value is itself an
> array of partly-filled-out pg_attribute tuples, so it's common to those two
> needs, but specific to stats about attributes. Maybe we need an
> attr_stats_utils.h?

Hmm, maybe.  I'd be OK to revisit these structures once we're happy
with the in/out structures.  That would be a good start point before
working on the SQL functions and the dump/restore bits in more
details.

In addition to the changes detailed above, I fixed a few typos and incorporated the v8 change.

Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Remove unused for_all_tables field from AlterPublicationStmt
Next
From: Ashutosh Bapat
Date:
Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring