Install and update SQL¶
This page explains where the KDB-X installer puts the SQL interface, and how to install or update it yourself from the KX downloads portal.
The SQL interface is a single file, s.k_. .s.init[] and the s) prompt load it from the q/ folder of your KDB-X installation directory.
Installed by default¶
The KDB-X installer downloads the latest SQL release and places s.k_ in q/ in your installation directory, which defaults to $HOME/.kx. You do not need to install it separately after a standard installation.
Linux ARM
The installer skips the SQL download on Linux ARM (aarch64), because the archive also contains pgwire, which is not built for that platform. The SQL interface itself works on Linux ARM. Follow the manual steps below with the Linux x86-64 archive, and copy only s.k_.
Install or update manually¶
Install manually when you want a newer SQL release than the one your installer shipped, or on Linux ARM.
Before you begin¶
- Know your KDB-X installation directory. The default is
$HOME/.kx. The commands below use that path. If you installed KDB-X elsewhere, replace it with your installation directory. Theq/folder is next to thebin/folder that holds theqexecutable, whichwhich qshows you.
1. Download the archive¶
Download the archive for your platform from the SQL directory in the KX downloads portal. The ~latest~ path always points at the newest release. Each archive contains s.k_, the pgwire executable, a readme and a changelog. The s.k_ file is the same in every archive.
| Archive | Platform |
|---|---|
l64-sql.zip |
Linux x86-64, and Linux ARM for s.k_ only |
m64-sql.zip |
macOS (Intel and Apple Silicon) |
w64-sql.zip |
Windows |
curl -L -O https://portal.dl.kx.com/assets/raw/kdb-x/sql/~latest~/l64-sql.zip
curl -L -O https://portal.dl.kx.com/assets/raw/kdb-x/sql/~latest~/m64-sql.zip
Download w64-sql.zip in your browser.
To install a specific version instead, replace ~latest~ with the version number, for example 1.2.3.
2. Extract and copy the file¶
Extract the archive, then copy s.k_ into q/ in your installation directory. Copying over the existing file updates it.
unzip -q l64-sql.zip -d sql
cp sql/s.k_ "$HOME/.kx/q/"
unzip -q m64-sql.zip -d sql
cp sql/s.k_ "$HOME/.kx/q/"
Extract the archive, then copy s.k_ into q/ in your KDB-X installation
The same archive contains the pgwire executable. To update it at the same time, follow Install and update pgwire.
3. Verify the installation¶
Start q and initialize the SQL interface. .s.rel returns the release date of the loaded s.k_, which you can compare with the SQL release notes.
q).s.init[]
q).s.rel
2026.10.20
If .s.init[] fails with an error, s.k_ is not in q/ in the installation directory that q is using.
Next steps¶
- Run your first SQL statements with the SQL quickstart.
- Connect PostgreSQL clients to KDB-X with pgwire.
- Read what changed in each release in the SQL release notes.