Re: Dubious usage of TYPCATEGORY_STRING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Dubious usage of TYPCATEGORY_STRING
Date: 2021-12-07 20:24:46
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
>> Could we add explicit casts (like polcmd::text) here? Or would it break
>> too much?

> I assumed it'd break too much to consider doing that. But I suppose
> that since a typcategory change would be initdb-forcing anyway, maybe
> it's not out of the question. I'll investigate and see exactly how
> many places would need an explicit cast.

Um, I definitely gave up too easily there. The one usage in \dp
seems to be the *only* thing that breaks in describe.c, and pg_dump
doesn't need any changes so far as check-world reveals. So let's
just move "char" to another category, as attached.

regards, tom lane

Attachment Content-Type Size
0001-dont-put-special-purpose-types-in-string-category-2.patch text/x-diff 8.2 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-12-07 20:27:36 Re: Why doesn't pgstat_report_analyze() focus on not-all-visible-page dead tuple counts, specifically?
Previous Message Andrew Dunstan 2021-12-07 19:26:55 Re: MSVC SSL test failure