page.tsx158 lines · main
1import { DocsShell } from '../../components/shell';
2
3export const metadata = {
4 title: 'doltgres',
5};
6
7export default function DoltgresPage() {
8 return (
9 <DocsShell>
10 <h1 className="font-mono text-2xl tracking-tight">doltgres</h1>
11 <p className="mt-2 font-mono text-sm text-[var(--color-text-muted)]">
12 a PostgreSQL-wire database you can branch, commit, diff, merge, and time-travel like Git —
13 &ldquo;Git for your data.&rdquo; <strong className="text-[var(--color-text)]">Briven is
14 Doltgres-first:</strong> it powers <em>both</em> the platform control database and every
15 project database (not only “the data plane”).
16 </p>
17
18 <div className="mt-6 rounded-md border border-[var(--color-border-subtle)] bg-[var(--color-surface)] p-4 font-mono text-xs text-[var(--color-text-muted)]">
19 <strong className="text-[var(--color-text)]">heads up — DoltGres is Beta.</strong> It is
20 still pre-1.0 (1.0 is targeted around October 2026), runs roughly 5.2× slower than stock
21 PostgreSQL today, and some PostgreSQL features are not implemented yet. It is solid enough
22 to build on, but read{' '}
23 <a className="underline" href="/doltgres/limitations">
24 beta + limitations
25 </a>{' '}
26 before you lean on it for anything load-bearing.
27 </div>
28
29 <h2 className="mt-12 font-mono text-lg">what it is, in plain words</h2>
30 <p className="mt-3 font-mono text-sm text-[var(--color-text-muted)]">
31 Think of a normal database as a single live document that only ever shows you the latest
32 version. DoltGres is the same database, but with a full history attached — like Git for
33 code, except the thing under version control is your <em>data</em>. You can take a snapshot
34 (a <em>commit</em>), spin off a separate copy to experiment on (a <em>branch</em>), compare
35 two versions side by side (a <em>diff</em>), fold changes back together (a <em>merge</em>),
36 and ask &ldquo;what did this table look like last Tuesday?&rdquo; (<em>time travel</em>).
37 Underneath, it is a real PostgreSQL database — your app talks to it the same way it talks to
38 any Postgres.
39 </p>
40
41 <h2 className="mt-12 font-mono text-lg">Dolt is not DoltGres</h2>
42 <p className="mt-3 font-mono text-sm text-[var(--color-text-muted)]">
43 This is the single most common point of confusion, so it is worth being crisp. There are
44 two products from the same team, built on the same versioned storage engine, but they speak
45 different languages:
46 </p>
47 <div className="mt-4 overflow-x-auto">
48 <table className="w-full border-collapse font-mono text-xs">
49 <thead>
50 <tr className="border-b border-[var(--color-border)] text-left text-[var(--color-text)]">
51 <th className="py-2 pr-4 font-normal"> </th>
52 <th className="py-2 pr-4 font-normal">Dolt</th>
53 <th className="py-2 font-normal">DoltGres</th>
54 </tr>
55 </thead>
56 <tbody className="text-[var(--color-text-muted)]">
57 <tr className="border-b border-[var(--color-border-subtle)]">
58 <td className="py-2 pr-4 text-[var(--color-text)]">dialect</td>
59 <td className="py-2 pr-4">MySQL</td>
60 <td className="py-2">PostgreSQL</td>
61 </tr>
62 <tr className="border-b border-[var(--color-border-subtle)]">
63 <td className="py-2 pr-4 text-[var(--color-text)]">default port</td>
64 <td className="py-2 pr-4">3306</td>
65 <td className="py-2">5432</td>
66 </tr>
67 <tr className="border-b border-[var(--color-border-subtle)]">
68 <td className="py-2 pr-4 text-[var(--color-text)]">client</td>
69 <td className="py-2 pr-4">mysql</td>
70 <td className="py-2">psql</td>
71 </tr>
72 <tr className="border-b border-[var(--color-border-subtle)]">
73 <td className="py-2 pr-4 text-[var(--color-text)]">how you commit</td>
74 <td className="py-2 pr-4">
75 <code>CALL DOLT_COMMIT(...)</code>
76 </td>
77 <td className="py-2">
78 <code>SELECT dolt_commit(...)</code>
79 </td>
80 </tr>
81 </tbody>
82 </table>
83 </div>
84 <p className="mt-4 font-mono text-sm text-[var(--color-text-muted)]">
85 The headline difference: in DoltGres, every version-control operation is a{' '}
86 <strong className="text-[var(--color-text)]">function you call with </strong>
87 <code>SELECT</code>, never <code>CALL</code> — for example{' '}
88 <code>SELECT dolt_commit(&apos;-am&apos;, &apos;my message&apos;);</code>. PostgreSQL allows
89 side effects inside a <code>SELECT</code> (the same way <code>nextval()</code> works), so
90 DoltGres leans on that. Any DoltGres example you write or copy should use the{' '}
91 <code>SELECT dolt_*</code> form on port <code>5432</code> with <code>psql</code>. If you see
92 a <code>CALL</code> or port <code>3306</code>, that is MySQL Dolt, not DoltGres.
93 </p>
94
95 <h2 className="mt-12 font-mono text-lg">the superpowers</h2>
96 <ul className="mt-3 flex flex-col gap-2 font-mono text-sm">
97 <NextLink
98 href="/doltgres/version-control"
99 title="version control"
100 body="branch, commit, diff, and merge your data with SELECT dolt_branch / dolt_commit / dolt_merge"
101 />
102 <NextLink
103 href="/doltgres/history"
104 title="history + time travel"
105 body="query any past commit or timestamp with AS OF, and read the commit log from the dolt schema"
106 />
107 <NextLink
108 href="/doltgres/types"
109 title="types + sql support"
110 body="which PostgreSQL types and SQL features work today, which are partial, and which are not in yet"
111 />
112 <NextLink
113 href="/doltgres/limitations"
114 title="beta + limitations"
115 body="the honest list — what is pre-1.0, what is slow, and what PostgreSQL features are still missing"
116 />
117 <NextLink
118 href="/doltgres/install"
119 title="install + run"
120 body="install the engine, start the server on port 5432, and connect with psql (self-host / local)"
121 />
122 </ul>
123
124 <h2 className="mt-12 font-mono text-lg">what to read next</h2>
125 <ul className="mt-3 flex flex-col gap-2 font-mono text-sm">
126 <NextLink
127 href="/doltgres/install"
128 title="install + run"
129 body="get DoltGres running locally and connect with psql in a couple of minutes"
130 />
131 <NextLink
132 href="/doltgres/version-control"
133 title="version control"
134 body="the core Git-for-data workflow: branch, commit, diff, merge"
135 />
136 <NextLink
137 href="/doltgres/limitations"
138 title="beta + limitations"
139 body="read this before you depend on DoltGres in production"
140 />
141 </ul>
142 </DocsShell>
143 );
144}
145
146function NextLink({ href, title, body }: { href: string; title: string; body: string }) {
147 return (
148 <li>
149 <a
150 href={href}
151 className="block rounded-md border border-[var(--color-border-subtle)] bg-[var(--color-surface)] p-4 transition hover:border-[var(--color-border)]"
152 >
153 <p className="font-mono text-[var(--color-text)]">{title}</p>
154 <p className="mt-1 font-mono text-xs text-[var(--color-text-muted)]">{body}</p>
155 </a>
156 </li>
157 );
158}