Re: Add expressions to pg_restore_extended_stats() - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Add expressions to pg_restore_extended_stats()
Date
Msg-id CADkLM=eLuF7LzNKYnRFUWDDqS-eWYeP+jD2Gd+CES_GQQHT3uw@mail.gmail.com
Whole thread Raw
In response to Re: Add expressions to pg_restore_extended_stats()  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: Add expressions to pg_restore_extended_stats()
List pgsql-hackers
3. convert the record to jsonb, deleting the known annoying column keys (oids, timestamps, etc) and then set-differencing those.
4. do the views, but add in a regression check on the number of columns in the base table, with a comment that says "if this check ever fails, the new column(s) have to be added to the view above".

For the reasons stated, I think it's down to options 3 and 4. Any preferences?

or

5. Generate the column list of the view (or set difference queries) with a \gexec query that filters out the oids.

All of these things are sliiightly hacky, but if we settle on one pattern that will allow us to use the pattern in multiple places and thus reduce surprise to the reader.
 

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Consider low startup cost in add_partial_path
Next
From: Jacob Champion
Date:
Subject: Re: Improve OAuth discovery logging