char | A fixed length string of text, padded to the right with spaces, if necessary. Fields of this type must have a width, which determines the number of characters that they can store. This width cannot be greater than 254 characters. To store larger strings, use a text field. |
varchar | Similar to the char type, except that text is not padded with spaces. This is the best type to use for the storage of short strings. |
int2 | A 2-byte integer, which can store numbers in the range –215 to +215 (approximately 32,000). |
int4 | A 4-byte integer, which can store values from –231 to +231 (approximately 2 billion). |
int8 | An 8-byte integer, which can store numbers in the range –263 to +263. |
float4 | A number that can contain decimals, such as 12.34. Because this type uses a 4-byte floating-point format internally, numbers with many digits cannot be stored accurately and will be rounded off to the nearest possible number. For this reason, float4 and float8 fields should not be used for values that must always be accurate, such as monetary values. The numeric type should be used instead. |
float8 | Like the float4 type, but uses 8 bytes for storage and thus can handle values with more significant digits. |
numeric | Fields of this type can accurately store decimal numbers up to a maximum number of digits. When adding a numeric field, you must specify the width as two numbers separated by a comma. The first is the total number of significant digits that it can store and the second is the number of digits to the right of the decimal point. |
date | Stores a year, month, and day. Dates are always displayed by PostgreSQL in the format YYYY-MM-DD, and should be entered in that format as well. |
time | Stores an hour, minute, and second. Times are always displayed in the format HH:MM:SS. |
timestamp | Stores a year, month, day, hour, minute, second, and timezone offset. Values in a timestamp field are always shown in the format YYYY-MM-DD HH:MM:SS+ZZ, and should be entered in that format as well. |
text | A field of this type can store an unlimited amount of text. No maximum size can be or needs to be specified. |