Python Type | PostgreSQL Type | Notes |
---|---|---|
bool | bool | |
int | int4 | |
long | numeric | |
str | text | |
unicode | text | |
float | float8 | |
decimal.Decimal | numeric | |
pg8000.types.Bytea | bytea | |
datetime.datetime (wo/ tzinfo) | timestamp without time zone | |
datetime.datetime (w/ tzinfo) | timestamp with time zone | |
datetime.date | date | |
datetime.time | time without time zone | |
pg8000.types.Interval | interval | |
None | NULL | |
list of int | INT4[] | |
list of float | FLOAT8[] | |
list of bool | BOOL[] | |
list of str | TEXT[] | |
list of unicode | TEXT[] |
An Interval represents a measurement of time. In PostgreSQL, an interval is defined in the measure of months, days, and microseconds; as such, the pg8000 interval type represents the same information.
Note that values of the microseconds, days and months properties are independently measured and cannot be converted to each other. A month may be 28, 29, 30, or 31 days, and a day may occasionally be lengthened slightly by a leap second.
Measure of microseconds in the interval.
The microseconds value is constrained to fit into a signed 64-bit integer. Any attempt to set a value too large or too small will result in an OverflowError being raised.
Measure of days in the interval.
The days value is constrained to fit into a signed 32-bit integer. Any attempt to set a value too large or too small will result in an OverflowError being raised.
Measure of months in the interval.
The months value is constrained to fit into a signed 32-bit integer. Any attempt to set a value too large or too small will result in an OverflowError being raised.