Re: [HACKERS] Cache lookup errors with functions manipulation object addresses
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Aleksander Alekseev <a.alekseev@postgrespro.ru>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2018-02-12T22:57:34Z
Lists: pgsql-hackers
Michael Paquier wrote: > On Fri, Jan 12, 2018 at 11:01:59AM +0900, Michael Paquier wrote: > > Thanks Mr. Robot and Thomas for the reminder. Attached is an updated > > patch set taking care of those warnings, 0002 and 0004 being impacted. > > The last patch set has rotten enough for git am to complain (not patch > -p1), so attached is a new set. Pushed 0001, which was easy enough to deal with. I think 0002 and 0003 should be changed similarly: the elog(ERROR) code should be inside "if" and the "return NULL" case the straight path, rather than the other way around. That seems more robust than the compiler relying on knowledge that elog(ERROR) does not return. As far as format_type_extended() is concerned, IMO we've gone far enough with the number of variants of format_type(). Making the function public makes sense to me, but let's add a bits32 flags argument instead of exposing the messy set of booleans. We can add compatibility wrappers for the flag combinations most used in core code, and maybe take the opportunity phase out the uncommon ones. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Eliminate cache lookup errors in SQL functions for object addresses
- 2a10fdc4307a 14.0 landed
-
Refactor routines for name lookups of procedures and operators
- aa38434824c4 14.0 landed
-
Add new flag to format_type_extended() to get NULL for undefined type
- 1185c782943c 14.0 landed
-
Introduce new extended routines for FDW and foreign server lookups
- 8fb569e978af 12.0 landed
-
Refactor routines for subscription and publication lookups
- 1d6fbc38d9ed 12.0 landed
-
get_relid_attribute_name is dead, long live get_attname
- 8237f27b504f 11.0 landed
-
Tweak parser so that there is a defined representation for datatypes
- a585c20d12d0 7.2.1 cited