Column Types Reference

Available to: Developers, Admins Minimum plan: Free

This page provides a complete reference for all data types supported in TitanRDM column definitions. Each type maps to a PostgreSQL data type in the underlying database.


Text Types

TypeDescriptionLength ParameterNotes
varcharVariable-length character stringMaximum number of characters (e.g., 50, 255)Most common text type. If length is omitted, defaults to unlimited.
characterFixed-length character stringExact number of charactersValues are right-padded with spaces to the specified length. Rarely needed — prefer varchar.
textUnlimited-length textNot applicableNo maximum length. Suitable for descriptions, notes, or large text content.

When to Use Each

  • varchar — the default choice for most text columns (names, codes, descriptions with known max length)
  • character — only when values must always be exactly N characters (e.g., ISO country codes are always 2 or 3 characters)
  • text — when there is no practical upper bound on length

Integer Types

TypeDescriptionRangeNotes
smallintSmall-range integer-32,768 to 32,7672 bytes. Use for small counters or codes.
integerStandard integer-2,147,483,648 to 2,147,483,6474 bytes. The default choice for whole numbers.
bigintLarge-range integer-9.2 × 10¹⁸ to 9.2 × 10¹⁸8 bytes. Use when values may exceed 2 billion.

When to Use Each

  • integer — the default for most numeric identifiers, counts, and codes
  • smallint — when storage efficiency matters and values are known to be small
  • bigint — for very large identifiers (e.g., external system IDs that exceed 2 billion)

Decimal / Floating-Point Types

TypeDescriptionLength (Precision)ScaleNotes
decimalExact numeric with configurable precisionTotal number of digits (1–1000)Number of digits after the decimal pointExact arithmetic — no rounding errors. Use for financial data.
realSingle-precision floating pointNot applicableNot applicable4 bytes, ~6 decimal digits of precision. Subject to rounding.
doubleDouble-precision floating pointNot applicableNot applicable8 bytes, ~15 decimal digits of precision. Subject to rounding.

Precision and Scale for Decimal

For decimal columns: - Length = precision = total number of significant digits (both sides of the decimal point) - Scale = number of digits to the right of the decimal point

Examples:

LengthScaleStoresExample Values
102Up to 99,999,999.991234.56, 99999999.99
53Up to 99.99912.345, 0.001
30Up to 999 (whole numbers only)100, 999

When to Use Each

  • decimal — financial amounts, rates, percentages, or any value where exact arithmetic is required
  • real / double — scientific measurements or values where minor rounding is acceptable

Boolean Type

TypeDescriptionValid ValuesNotes
booleanTrue/false valuetrue, false, null (if not required)Rendered as a checkbox in the data grid.

Date and Time Types

TypeDescriptionLength ParameterFormatNotes
dateCalendar date (no time)Not applicableYYYY-MM-DDE.g., 2024-03-15
timeTime of day without timezoneFractional-second precision (0–6)HH:mm:ssE.g., 14:30:00
timetzTime of day with timezoneFractional-second precision (0–6)HH:mm:ss±HH:mmE.g., 14:30:00+10:00
timestampDate and time without timezoneFractional-second precision (0–6)YYYY-MM-DDTHH:mm:ssE.g., 2024-03-15T14:30:00
timestamptzDate and time with timezoneFractional-second precision (0–6)YYYY-MM-DDTHH:mm:ss±HH:mmE.g., 2024-03-15T14:30:00+10:00

Fractional-Second Precision

The Length parameter on time/timestamp types controls fractional-second precision:

LengthStoresExample
0Whole seconds only14:30:00
3Milliseconds14:30:00.123
6Microseconds (default)14:30:00.123456

Data Grid Editors

TypeEditor
dateNative browser date picker
time, timetzNative browser time picker
timestamp, timestamptzNative browser datetime-local picker

When to Use Each

  • date — birthdays, effective dates, expiry dates — anything where time is not relevant
  • timestamp — event timestamps where timezone context is not needed (or all data is in a single timezone)
  • timestamptz — event timestamps in multi-timezone environments (stores in UTC, displays in local time)
  • time / timetz — rare in reference data; use for schedule times (e.g., store opening hours)

Binary Type

TypeDescriptionNotes
binaryBinary data (bytea)Stores raw bytes. Not editable through the data grid UI. Typically populated via imports or the API.

Type Selection Guide

ScenarioRecommended Type
Short codes (country, currency, status)varchar with length
Names, labels, titlesvarchar with length
Long descriptions or notestext
Whole number identifiersinteger
Financial amountsdecimal with appropriate precision and scale
Yes/no flagsboolean
Calendar datesdate
Event timestampstimestamptz
Fixed-format codes (always same length)character with length

Type Changes After Deployment

When you change a column's data type after the table has been deployed, TitanRDM generates an ALTER TABLE ... ALTER COLUMN ... TYPE statement on the next deployment. The database will attempt to cast existing data to the new type.

Common safe conversions: - integerbigint (widening) - varchar(50)varchar(100) (lengthening) - integervarchar (numbers become strings)

Conversions that may fail: - varcharinteger (if non-numeric data exists) - varchar(100)varchar(50) (if any value exceeds 50 characters) - timestampdate (time portion is lost, but does not fail)

Warning: Always review the deployment diff carefully when changing column types on tables that already contain data. A failed type cast will cause the deployment to fail.