You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sqlboiler generates int instead of int32 for PostgreSQL int4 type, causing type inconsistency #1464
When using sqlboiler with PostgreSQL, int4 (integer) columns are generated as int type in Go structs instead of int32. This causes type inconsistency issues because:
PostgreSQL int4 is always 32-bit regardless of platform
Go int is platform-dependent (32-bit on 32-bit systems, 64-bit on 64-bit systems)
This leads to unnecessary type conversions and potential overflow issues on 32-bit systems
Current Behavior
PostgreSQL Schema:
CREATETABLEimg_category (
id SERIALPRIMARY KEY, -- int4 type
......
);
Activity
kylelmh commentedon Sep 26, 2025
I think it's a similar issue as #1308. A quick and dirty workaround is to patch the generated Files.
KeitaShimura commentedon Feb 28, 2026
I gave this a try in #1469. Would love to hear your thoughts!