HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Adaptation of Python values to SQL types

Many standard Python types are adapted into SQL and returned as Python objects when a query is executed.

The following table shows the default mapping between Python and PostgreSQL types:

Python PostgreSQL
None NULL
bool bool
float real,double
int, long smallint, integer, bigint
Decimal numeric
str, unicode varchar, text
buffer, memoryview, bytearray, bytes, Buffer protocol bytea
date date
time time, timetz
datetime timestamp, timestamptz
timedelta interval
list ARRAY
tuple, namedtuple Composite types, IN syntax
dict hstore
Psycopg’s Range range
Anything™ json
UUID uuid
ipaddress objects inet, cidr

For more information, see Community project documentation

Copyright © 2011-2024 www.enmotech.com All rights reserved.