Skip to content

sql: separate the notion of a "column type" from that of a "data type" #1009

@knz

Description

@knz

Raphael 'kena' Poss (knz) commented:

Currently all the pages for individual data types int.md string.md etc conflate data type and column type.

In particular they miss the distinction between "inserting a value into a column of a given column type" from "computing a value of a given data type".

This distinction is especially important because:

  • we support different data types and column types (e.g. we can compute tuples but not store them, and we can store SERIAL but not compute it);
  • for data types without an equivalent column type, it is still possible to create and compute values of that type
  • in the documentation about expressions, the reader is in a mindset where expressions can be computed independently from INSERT, and we need to preserve that mindset when we direct the reader to the page for a specific data type. Currently this mindset is disrupted because one of the first thing on each data type page is a reference to "columns of that type".

Steps to improve:

  1. (the most important) rephrase the individual pages about data types to avoid referring to column types, avoid phrases like "inserting into a column of that type" and only use INSERT examples as incidental, after another main example without INSERT.
  2. create a new page "Storage data types vs. computation data types" which explains which types can be stored in a table and which types cannot, and what happens with the data (representation-wise) when it goes from memory to disk or back again.

Jira Issue: DOC-97

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions