Fix CREATE TABLE / LIKE with bigint identity column
Peter Eisentraut <peter_e@gmx.net>
Fix CREATE TABLE / LIKE with bigint identity column CREATE TABLE / LIKE with a bigint identity column would fail on platforms where long is 32 bits. Copying the sequence values used makeInteger(), which would truncate the 64-bit sequence data to 32 bits. To fix, use makeFloat() instead, like the parser. (This does not actually make use of floats, but stores the values as strings.) Bug: #15096 Reviewed-by: Michael Paquier <michael@paquier.xyz>
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/sequence.c | modified | +13 −6 |
| src/test/regress/expected/create_table_like.out | modified | +14 −14 |
| src/test/regress/sql/create_table_like.sql | modified | +1 −1 |