1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31.

Commit aa0105141 repeated one of the oldest mistakes in our book:
thinking that OID is the same as int32.  It isn't of course, and
unsurprisingly the first person who came along with a database
OID above 2 billion broke it.  Repair.

Per bug #17677 from Sergey Pankov.  Back-patch to v15.

Discussion: https://postgr.es/m/17677-a99fa067d7ed71c9@postgresql.org
This commit is contained in:
Tom Lane
2022-11-04 10:39:52 -04:00
parent 8c71467908
commit 34fa0ddae5
4 changed files with 37 additions and 3 deletions

View File

@ -11105,9 +11105,9 @@ createdb_opt_items:
;
createdb_opt_item:
createdb_opt_name opt_equal SignedIconst
createdb_opt_name opt_equal NumericOnly
{
$$ = makeDefElem($1, (Node *) makeInteger($3), @1);
$$ = makeDefElem($1, $3, @1);
}
| createdb_opt_name opt_equal opt_boolean_or_string
{