Re: Patch: Add parse_type Function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch: Add parse_type Function
Date
Msg-id 4153674.1708375642@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch: Add parse_type Function  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: Patch: Add parse_type Function
Re: Patch: Add parse_type Function
List pgsql-hackers
"David E. Wheeler" <david@justatheory.com> writes:
> The only way I can think of to avoid that is to:

> 1. Add a to_regtypmod() for those who just want the typemod.

Seems like there's a good case for doing that.

> 2. Add a format_type_string() function that returns a string, the equivalent of this function but in C:

> CREATE FUNCTION format_type_string(text) RETURNS TEXT AS $$
>    SELECT format_type(to_regtype($1), to_regtypmod($1))
> $$;

I'm less thrilled about that, mainly because I can't think of
a good name for it ("format_type_string" is certainly not that).
Is the use-case for this functionality really strong enough that
we need to provide it as a single function rather than something
assembled out of spare parts?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Why is pq_begintypsend so slow?
Next
From: Chris Cleveland
Date:
Subject: Possible to trigger autovacuum?