mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Previously we called strtol() with base 0, so that a leading zero digit caused the number to be read as octal. This is not documented because it was not the original intent: before commit7ccb6dc2d, this code used atoi() which would have read the number as decimal always. Use base 10 instead to restore the original behavior. Also reject a bare minus sign consistently. Per POSIX, strtol() "may" set errno for that case but doesn't have to, and if it doesn't then we'd not have noticed the bad syntax but read the value as 0. Although this change restores old behavior,7ccb6dc2dwas a long time ago, so it's at least possible that someone out there is expecting the octal behavior. So it doesn't seem like a great idea to put this into stable branches. But I (tgl) judge it not too late for v19. Author: Marko Grujic <marko.grujic@enterprisedb.com> Reviewed-by: Manu <manuelreyesbravo@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAOvwyF3=brZoxwcwHRQqvLjuqSqxiTN7RXpKMNHXJ1WAS5GQ2Q@mail.gmail.com Backpatch-through: 19
The PostgreSQL contrib tree
---------------------------
This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree. This does not preclude their
usefulness.
User documentation for each module appears in the main SGML
documentation.
When building from the source distribution, these modules are not
built automatically, unless you build the "world" target. You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.
Some directories supply new user-defined functions, operators, or
types. To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command. In a fresh database,
you can simply do
CREATE EXTENSION module_name;
See the PostgreSQL documentation for more information about this
procedure.