Re: Question about an inconsistency - 2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "petrum(at)gmail(dot)com" <petrum(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question about an inconsistency - 2
Date: 2016-07-20 00:37:07
Message-ID: 21868.1468975027@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"petrum(at)gmail(dot)com" <petrum(at)gmail(dot)com> writes:
> In file postgresql-9.4.4/src/backend/utils/adt/format_type.c
> function format_type_internal line 159, shouldnt be used
> array_base_type instead of type_oid?

IIRC, that was intentional. Supposing there's a pg_type row with
a corrupted typelem value, it's more useful to point at the bogus
row than to report the junk value with no context. I suppose you
could argue that it should be more like

elog(ERROR, "cache lookup failed for type %u (typelem of %u)",
array_base_type, type_oid);

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-07-20 00:47:08 Re: Question about an inconsistency - 3
Previous Message Michael Paquier 2016-07-19 23:42:45 Re: [BUG] pg_basebackup from disconnected standby fails