From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
Cc: | Erik Wienhold <ewie(at)ewie(dot)name>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Patch: Add parse_type Function |
Date: | 2024-02-19 20:47:22 |
Message-ID: | 4153674.1708375642@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"David E. Wheeler" <david(at)justatheory(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Cleveland | 2024-02-19 21:15:29 | Possible to trigger autovacuum? |
Previous Message | Andres Freund | 2024-02-19 19:53:51 | Re: Why is pq_begintypsend so slow? |