Skip to content

PostgreSQL data types

PostgreSQL has the richest type system of the engines TableAI supports. Supported in the tables below means TableAI shows the value in the grid and lets you edit it where the column allows editing. Open a table or run a query to inspect values in the results grid.

Type What it stores TableAI
smallint 2-byte integer, -32,768 to 32,767 Supported
integer 4-byte integer, -2,147,483,648 to 2,147,483,647 Supported
bigint 8-byte integer, -2^63 to 2^63-1 Supported
smallserial, serial, bigserial Auto-incrementing integers: smallint, integer and bigint columns with a sequence default Supported
numeric, decimal Exact number with a set precision and scale, up to 131,072 digits before the decimal point and 16,383 after Supported
real 4-byte approximate number Supported
double precision 8-byte approximate number Supported
money A currency amount with a fixed fractional precision Supported

What are the PostgreSQL character and binary types?

Section titled “What are the PostgreSQL character and binary types?”
Type What it stores TableAI
char(n) Fixed-length text, padded with spaces Supported
varchar(n) Variable-length text up to n characters Supported
text Variable-length text of any length Supported
"char" A single-byte internal type Supported
name An internal type for object names Supported
bytea Binary data Supported

What are the PostgreSQL date and time types?

Section titled “What are the PostgreSQL date and time types?”
Type What it stores TableAI
date A calendar date Supported
time, time without time zone A time of day Supported
timetz, time with time zone A time of day with a time zone Supported
timestamp, timestamp without time zone A date and time Supported
timestamptz, timestamp with time zone A date and time stored as UTC and shown in the session time zone Supported
interval A span of time Supported
Type What it stores TableAI
boolean true, false or NULL Supported
json A JSON document stored as text Supported
jsonb A JSON document stored in a decomposed binary format Supported
Arrays, such as integer[] An array of any built-in or user-defined type Supported
Enum One value from a list created with CREATE TYPE Supported
Composite A row-like type created with CREATE TYPE Supported
Domain A base type with added constraints Supported
uuid A 128-bit universally unique identifier Supported
xml An XML document Supported
bit(n), bit varying(n) Bit strings Supported
hstore Key-value pairs (extension) Supported
citext Case-insensitive text (extension) Supported

What are the PostgreSQL range, network and geometric types?

Section titled “What are the PostgreSQL range, network and geometric types?”
Type What it stores TableAI
int4range, int8range, numrange A range of integers or numbers Supported
tsrange, tstzrange, daterange A range of timestamps or dates Supported
Multiranges: int4multirange, int8multirange, nummultirange, tsmultirange, tstzmultirange, datemultirange A set of non-overlapping ranges Supported
inet, cidr IPv4 and IPv6 host addresses and networks Supported
macaddr, macaddr8 MAC addresses in 6-byte and 8-byte form Supported
point, line, lseg, box, path, polygon, circle Geometric shapes in the plane Supported
tsvector, tsquery Full-text search documents and queries Supported
oid, regclass, regtype, regproc and the other reg* types Object identifiers Supported

How do I enter each PostgreSQL value in TableAI?

Section titled “How do I enter each PostgreSQL value in TableAI?”
Type How to work with it
Integer types Enter whole numbers within the column’s range.
numeric, decimal Enter decimal text; PostgreSQL applies the column’s precision and scale.
real, double precision Use these for approximate numbers; use numeric when the database needs exact decimal arithmetic.
boolean Choose a boolean value from the cell menu.
Date, time and interval types Enter a date, time, or interval accepted by the column.
json, jsonb Edit JSON text. PostgreSQL validates the document when you apply it.
Arrays Use PostgreSQL array syntax, such as {1,2,3}.
Enum Choose from the column’s declared values.
uuid, network, range, and geometric types Use the PostgreSQL text syntax for the type.
bytea Use the binary cell menu to save bytes or stage a replacement file.

PostgreSQL also checks defaults, required values, and constraints when it receives a change. For example, a valid integer can still fail a column’s CHECK constraint.

A JSON document and a PostgreSQL array use different syntax:

SELECT '[1, 2, 3]'::jsonb AS json_value,
'{1,2,3}'::integer[] AS array_value;

jsonb stores a parsed document, so PostgreSQL can change whitespace and key order. See PostgreSQL’s references for JSON and array syntax. Inside an array, unquoted NULL means a null element; quoted "NULL" is text in a text array. Neither is the same as making the entire cell SQL NULL.

A binary cell shows the value’s size. Open its menu and choose Save as… to write the bytes to a file. To replace the value, select a local file from the same menu. The replacement stays staged until Apply.

Follow edit data safely to stage a value, preview its SQL, and apply the change. That guide also explains Set to NULL, Set to DEFAULT, and empty text. Use those explicit actions when you want SQL NULL or the column default.

For copy and inspection controls, see read results. Use import and export when you need files with explicit format options.