Sitelet https://github.com/ArcadeData/arcadedb-docs/pull/475
Skip to content

docs: add a Go PostgreSQL quickstart and fix the Python/JS ones - #475

Merged
robfrank merged 1 commit into
mainfrom
docs/go-postgres
Oct 6, 2026
Merged

robfrank merged 1 commit into
mainfrom
docs/go-postgres

Conversation

@robfrank

@robfrank robfrank commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the missing PostgreSQL protocol entry to the Go section of Languages & Drivers, matching Python and JavaScript.

  • New tutorials/go-quickstart.adoc: a Go version of the Python/JS PostgreSQL quickstarts, using pgx v5. It has the same sections: connect, schema, SQL, Cypher, vector search, full example.
  • Wiring: the new page is listed under "PostgreSQL protocol" in the Go nav group and included in tutorials/chapter.adoc for the legacy build and PDF. It also appears in the Native Drivers "Which page do I want?" tip, and pgx is now on the Go landing card.

pgx needs default_query_exec_mode=exec

pgx's default mode describes each prepared statement and encodes arguments to the parameter types the server reports. ArcadeDB reports every parameter as varchar, so passing a Go int fails with unable to encode 26 into text format for varchar (OID 1043). The tutorial puts default_query_exec_mode=exec in the connection string and has a NOTE explaining why. simple_protocol and a per-call pgx.QueryExecModeExec also work. This might be worth an engine issue: the server could report real parameter types instead of varchar.

Fixes to the Python and JS quickstarts

Running the sibling tutorials against 26.10.1 turned up two snippets that fail with a syntax error:

Snippet Problem Fix
SELECT person.name, … FROM MATCH {…} -Acted-> {…} not valid ArcadeDB SQL (no viable alternative at input 'MATCH') MATCH {…}.outE('Acted'){as: acted}.inV(){…} RETURN person.name AS name, …
CREATE INDEX ON Product (embedding) VECTOR (4, COSINE, LSM_VECTOR) syntax error, so the vector search that follows fails with "No vector index found" LSM_VECTOR METADATA {dimensions: 4, similarity: 'COSINE'} on a LIST OF FLOAT property, as in the vector search tutorial

The AS aliases also fix the JS SQL section, which reads row.name, row.title and row.role. Without aliases the columns come back as person.name and so on, and those reads are undefined.

Verification

All against arcadedata/arcadedb:26.10.1 with the Postgres plugin, on a fresh database:

  • Go: every snippet ran, plus the full example extracted verbatim from the page. The outputs shown are the real ones. Cypher works in exec mode.
  • Python: every snippet from Connect through Vector Search, extracted from the page and run with psycopg. MATCH returns Alice acted in The Matrix as Trinity, and the vector search returns Laptop, Tablet, Phone.
  • JS: same snippets with pg, wrapped in an async function because the page's top-level await with require doesn't run as-is in CommonJS. That problem predates this PR and is left alone. Same results.
  • docs-validator.py: broken refs unchanged (2, pre-existing). There's one new orphan warning, go-quickstart.adoc, because the validator only credits <<anchor>> references.
  • migrate.sh && npm run build passes, and no stray backticks reach the rendered page.
  • The new prose went through a humanizer pass.

🤖 Generated with Claude Code

Add tutorials/go-quickstart.adoc, the Go counterpart of the Python and
JavaScript PostgreSQL-protocol quickstarts, using pgx. It sets
default_query_exec_mode=exec because ArcadeDB describes every
parameter as varchar, which makes pgx's default mode refuse to encode
a Go int. List it in the Go nav group, the tutorials chapter, the
Native Drivers tip and the Go landing card.

Running the sibling tutorials against 26.10.1 showed two snippets that
fail with a syntax error there:

- `SELECT ... FROM MATCH {...} -Acted-> {...}` is not ArcadeDB SQL.
  Use `MATCH {...}.outE('Acted'){as: acted}.inV(){...} RETURN ...`.
- `CREATE INDEX ... VECTOR (4, COSINE, LSM_VECTOR)` is a syntax error.
  Use `LSM_VECTOR METADATA {dimensions: 4, similarity: 'COSINE'}`, as
  the vector search tutorial does, on a LIST OF FLOAT property.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergify

mergify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@robfrank
robfrank merged commit 18fa5db into main Oct 6, 2026
3 of 4 checks passed
@robfrank
robfrank deleted the docs/go-postgres branch October 6, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant