# pg_crdt > CRDTs (conflict-free replicated data types) for Postgres, in SQL and PL/pgSQL. Version 0.0.1 has one type, the PN-Counter, a counter that several writers can change independently and merge later. Use the guides and reference for implementation. Only the PN-Counter exists; the other types on the overview page are planned. Guides show JavaScript (node-postgres) examples first and the equivalent SQL. Markdown exports preserve every language example. ## Guides and reference - [Overview](/markdown/overview.md): pg_crdt adds conflict-free replicated data types (CRDTs) to Postgres. A CRDT is a value that several writers can change independently and merge later, in any order and any... - [pg_crdt documentation](/markdown/guide.md): pg_crdt adds conflict-free replicated data types (CRDTs) to Postgres, for values that several writers change independently and merge later. The extension is SQL and PL/pgSQL,... - [Install](/markdown/install.md): Install pg_crdt with create extension when the extension files are on the server, through pg_tle when they are not, or by running its SQL file directly. The database owner can... - [Quickstart: a counter column](/markdown/get-started/quickstart.md): Add a like counter to a table, let two writers count under their own names, merge a count that arrives from somewhere else, and read the value. It takes a few minutes and needs... - [Replicas and identity](/markdown/guides/replicas-and-identity.md): Every change to a counter is recorded under the name of the writer that made it. This page explains what that name is, the one rule about it that you must keep, how to recover... - [Update safely](/markdown/guides/safe-updates.md): A merge keeps every writer's changes only if it runs in the same statement that writes the result. This page shows the pattern, why it is safe, the pattern that loses updates,... - [Accept writes from untrusted clients](/markdown/guides/security.md): Use this guide when clients send their own counts: a browser, a phone, or a service that you do not run. You give them a function that applies their delta and refuses to record... - [Storage and performance](/markdown/guides/storage-and-performance.md): A counter can live in one column that you update, or in a table of insert-only deltas that you aggregate. This page compares the two, shows how to index the value, and says... - [Collaborative text for a blog post](/markdown/guides/collaborative-text.md): Build a blog post whose body several people edit at once: wrapper functions that decide who may edit which post, form saves that keep every editor's change, live editing by... - [PN-Counter](/markdown/types/pn-counter.md): A PN-Counter (positive-negative counter) is a counter that goes up and down, which several writers can change independently and merge later. It is the first type of pg_crdt and... - [Collaborative text](/markdown/types/collaborative-text.md): Collaborative text is a plain-text document that several writers edit at the same time, online or offline, and that converges to the same text wherever the edits are merged.... - [Shared](/markdown/reference/shared.md): What every type in pg_crdt has in common: the schema and naming, replica ids, the function that finds the caller's identity, and the state envelope with its versioning.... - [PN-Counter functions](/markdown/reference/pn.md): Every function of the PN-Counter, in schema crdt. The type is the domain crdt.pn over jsonb: see PN-Counter for its state and behavior, Shared for naming, privileges and... - [Collaborative text column functions](/markdown/reference/yseq.md): Every function of the collaborative text column type, crdt.yseq, in schema crdt. A crdt.yseq value is a whole document in one jsonb value: a column of your own table, written... - [Collaborative text functions](/markdown/reference/ydoc.md): Every function of table-backed collaborative text (ydoc_), in schema crdt. For the column type crdt.yseq, see Collaborative text column functions. A document lives in the... - [JavaScript client](/markdown/reference/client.md): pg-crdt-client is a small JavaScript library for live editors of collaborative text documents. It keeps a replica of one document in memory, takes edits at JavaScript string... - [Errors](/markdown/reference/errors.md): Every error that pg_crdt raises, with its SQLSTATE, and the errors from Postgres that you can meet when you use it. Match on the SQLSTATE (error.code in node-postgres), not on... - [Limits](/markdown/reference/limits.md): What pg_crdt 0.0.1 does not do, and the numbers that bound what it does. The measurements are single runs on a laptop, in the benchmark reports for the PN-Counter, for text and... - [Changelog](/markdown/changelog.md): The first version of pg-crdt-client, in client/: a JavaScript library for live editors of collaborative text. Plain ESM with JSDoc types, no dependencies and no build step, for... ## Research and design records - [Research and design records](https://kiwicopple.github.io/pg-extensions/pg_crdt/): The architecture, prior art, benchmarks and the build journal, on the separate research site. ## Contributing - [pg_crdt test suite](/markdown/contributing/test-suite.md): The tests are the spec. Each file in spec/ is one goal, named in its header comment. The PN-Counter files (01 to 40) were written before the extension, for the PN-Counter slice... - [Documentation conventions](/markdown/contributing/style-guide.md): Write for a developer who stores shared state in Postgres. Use plain English, precise technical terms, and enough context to make each example usable. Prefer natural sentences...