On Mon, Jun 29, 2026 at 11:14 AM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Mon, Jun 29, 2026 at 1:20 AM Haibo Yan <tristan.yim@gmail.com> wrote:
> > I have attached the full patch series for review. Comments are welcome.
>
> This looks good!
>
> I haven't done a detailed review, but I skimmed over all of the
> patches and I like the direction. I think we should consider calling
> it a "format cast" instead of a "formatter". It would avoid needing to
> make "formatter" a parser keyword.
>
> --
> Robert Haas
> EDB: http://www.enterprisedb.com
Hi Robert,
Thanks for looking at the patches.
I liked your suggestion to call these “format casts” rather than
“formatters”, so I changed the series in that direction. The DDL is
now:
------------------------------------------------------
CREATE FORMAT CAST (...)
DROP FORMAT CAST (...)
------------------------------------------------------
rather than CREATE/DROP FORMATTER, so the patch no longer adds
FORMATTER as a keyword.
I also renamed the related catalog and node names, so this now uses
pg_format_cast and CoerceViaFormatCast. The
pg_dump/object-address/comment/extension code and the regression tests
have been updated to use the new terminology as well.
The rest of the design is the same as before: format casts are still
catalog-driven, and both built-in and user-defined cases go through
the same lookup path.
Attached is the updated v2 series.
Regards,
Haibo