Database & SQL
PostgreSQL Data Type Reference
Search PostgreSQL data types by name or use case to get storage size, precision characteristics, performance notes, and common anti-patterns to avoid.
Calculations run locally in your browserTool
About this tool
PostgreSQL Data Type Reference
The PostgreSQL Data Type Reference covers storage size, precision, performance characteristics, and common anti-patterns for all PostgreSQL built-in data types.
• Look up whether to use TEXT or VARCHAR for a string column
• Confirm TIMESTAMPTZ is the correct type for storing event timestamps across timezones
• Find the correct type for storing monetary values (NUMERIC not FLOAT)
• Check UUID storage size vs varchar(36) for a primary key decision
Next step
PostgreSQL Connection Pool Calculator — Calculate optimal PgBouncer pool size from max_connections, app servers, and query throughput.
Open PostgreSQL Connection Pool Calculator →
FAQ
What does this tool tell you?
The PostgreSQL Data Type Reference covers storage size, precision, performance characteristics, and common anti-patterns for all PostgreSQL built-in data types.
What affects the result most?
INTEGER vs BIGINT: 4 bytes vs 8 bytes — use BIGINT for auto-increment PKs expected to exceed 2.1B rows. TEXT vs VARCHAR(n): no performance difference in PostgreSQL — TEXT is preferred, VARCHAR adds a constraint. NUMERIC(p,s) vs FLOAT: NUMERIC is exact decimal, FLOAT is approximate IEEE 754 — use NUMERIC for money.
How should I use the result?
Use this tool to orient quickly to the concepts, field names, or values you are about to look up in a full specification or vendor documentation. It summarizes the common cases; the authoritative source remains whichever standard or vendor doc defines the values themselves.
Related tools