|< < 17 > >|

Creating tables

Column types (slightly Postgres-specific)

An incomplete list.

Integer:

  • smallint: 16-bit signed
  • integer or int: 32-bit signed
  • bigint: 64-bit signed

Fixed-precision:

  • numeric(PRECISION, SCALE):
    • precision: Number of digits
    • scale: Number of digits after decimal place.
    • scale ≤ precision
  • numeric(PRECISION): equivalent to numeric(PRECISION, 0).
  • decimal: equivalent to numeric

Floating-point:

  • real: Single-precision arithmetic (32 bits).
  • double precision: Double-precision arithmetic (64 bits).

|< < 17 > >|