BUG #4357: SERIAL pseudotype and related SEQUENCE object
The following bug has been logged online:
Bug reference: 4357
Logged by: Grigory Zinin
Email address: Grigory.Zinin@com.mels.ru
PostgreSQL version: 8.3.2
Operating system: win32 x86
Description: SERIAL pseudotype and related SEQUENCE object
Details:
It's possible that somebody already had found this thing, but I couldn't
find any references to this in archives.
We can create SERIAL field. But INTEGER type will be really set. It's well
known that INTEGER field doesn't match values more than 4 bytes. But related
SEQUENCE object has a 8 byte value.
It looks strange for me that 4 bytes of these 8 byte value will never be
used.
Is it bug or feature?
Grigory Zinin пишет:
The following bug has been logged online:
Bug reference: 4357
Logged by: Grigory Zinin
Email address: Grigory.Zinin@com.mels.ru
PostgreSQL version: 8.3.2
Operating system: win32 x86
Description: SERIAL pseudotype and related SEQUENCE object
Details:It's possible that somebody already had found this thing, but I couldn't
find any references to this in archives.
We can create SERIAL field. But INTEGER type will be really set. It's well
known that INTEGER field doesn't match values more than 4 bytes. But related
SEQUENCE object has a 8 byte value.
It looks strange for me that 4 bytes of these 8 byte value will never be
used.
Is it bug or feature?
A little mistake here.
Correct version 8.3.3 (latest)
Am Friday, 15. August 2008 schrieb Grigory Zinin:
We can create SERIAL field. But INTEGER type will be really set. It's well
known that INTEGER field doesn't match values more than 4 bytes. But
related SEQUENCE object has a 8 byte value.
It looks strange for me that 4 bytes of these 8 byte value will never be
used.
Is it bug or feature?
Well, it is that way by design, because most people will want the faster int4
type for their key fields. If you want a bigger type, you have of course
bigserial available.