mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
In pg_upgrade, properly handle oids > 2^31 by using strtoul() internally
rather than atol(). Per report from Brian Hirt
This commit is contained in:
@ -259,3 +259,15 @@ getErrorText(int errNum)
|
||||
#endif
|
||||
return strdup(strerror(errNum));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* str2uint()
|
||||
*
|
||||
* convert string to oid
|
||||
*/
|
||||
unsigned int
|
||||
str2uint(const char *str)
|
||||
{
|
||||
return strtol(str, NULL, 10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user