Avoid using atooid for numerical comparisons which arent Oids
Daniel Gustafsson <dgustafsson@postgresql.org>
Avoid using atooid for numerical comparisons which arent Oids The check for the number of roles in the target cluster for an upgrade selects the existing roles and performs a COUNT(*) over the result. A value of one is the expected query result value indicating that only the install user is present in the new cluster. The result was converted with the function for converting a string containing an Oid into a numeric, which avoids potential overflow but makes the code less readable since it's not actually an Oid at all. Discussion: https://postgr.es/m/41AB5F1F-4389-4B25-9668-5C430375836C@yesql.se
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_upgrade/check.c | modified | +1 −1 |
Discussion
- The use of atooid() on non-Oid results 3 messages · 2023-03-16