Not loaded · from iris-dev
Connects to InterSystems IRIS via the PostgreSQL wire protocol, enabling use of psycopg3, psycopg2, asyncpg, psql, pgAdmin, dbt, and other Postgres-compatible clients.
Claude Code won't load this skill
It ships in iris-dev at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Project: iris-pgwire
Status: community preview
Requires: IRIS 2024.1+; iris-pgwire package installed via ZPM
iris-pgwire exposes IRIS SQL over the PostgreSQL wire protocol. Any
psycopg3, psycopg2, asyncpg, or JDBC/Postgres-compatible client can
connect to IRIS without the intersystems-irispython package.
Useful when:
psql, pgAdmin, dbt)| Scenario | Preferred driver |
|---|---|
| Python inside IRIS (Embedded Python) | iris native module |
| Python outside IRIS, full IRIS API | intersystems-irispython |
| Python outside IRIS, SQL only, no deps | iris-pgwire + psycopg3 |
| Java / Spring | JDBC (com.intersystems.jdbc.IRISDriver) |
| Standard Postgres tooling | iris-pgwire |
See the iris-connectivity skill for the full connection-options table.
# On the IRIS instance
zpm "install iris-pgwire"
The package starts a listener on port 5432 (configurable via CPF). No IRIS restart required.
postgresql://username:password@host:5432/NAMESPACE
The database name in the connection string maps to the IRIS namespace (case-insensitive, uppercased internally).
import psycopg
conn = psycopg.connect(
"postgresql://_SYSTEM:SYS@localhost:5432/USER"
)
Or with keyword arguments:
conn = psycopg.connect(
host="localhost",
port=5432,
dbname="USER", # IRIS namespace
user="_SYSTEM",
password="SYS",
)
import psycopg
with psycopg.connect("postgresql://_SYSTEM:SYS@localhost:5432/USER") as conn:
with conn.cursor() as cur:
cur.execute("SELECT Name, DOB FROM Sample.Person WHERE Age > %s", (30,))
rows = cur.fetchall()
for name, dob in rows:
print(name, dob)
Async variant:
import psycopg
async with await psycopg.AsyncConnection.connect(
"postgresql://_SYSTEM:SYS@localhost:5432/USER"
) as conn:
async with conn.cursor() as cur:
await cur.execute("SELECT Name FROM Sample.Person")
rows = await cur.fetchall()
%s onlyiris-pgwire speaks the PostgreSQL extended query protocol. Use %s
placeholders, not ? (ODBC style) or :name (named style).
# Correct
cur.execute("SELECT * FROM Foo WHERE ID = %s", (42,))
# Wrong — do not use
cur.execute("SELECT * FROM Foo WHERE ID = ?", (42,))
| IRIS type | Python type returned |
|---|---|
%String | str |
%Integer | int |
%Double | float |
%Date | datetime.date |
%TimeStamp | datetime.datetime |
%Boolean | bool |
%List | str (encoded form) |
| Stream / clob | str (truncated at 64 KB by default) |
IRIS %List returns the internal $LISTBUILD encoding, not a Python list.
Use iris_list_to_python() helper from intersystems-irispython if you need
decoded list values, or store lists as JSON strings.
iris-pgwire exposes IRIS SQL transactions via the standard Postgres autocommit/explicit-transaction model:
conn.commit() or conn.rollback() explicitly.IRIS does not support SAVEPOINT — nested transactions will error. Use flat
transactions only.
conn.autocommit = False
try:
cur.execute("INSERT INTO MyTable (Name) VALUES (%s)", ("Alice",))
conn.commit()
except Exception:
conn.rollback()
raise
Each psycopg3 connection is bound to one namespace (the dbname in the
connection string). To query multiple namespaces, open separate connections.
SET SCHEMA is not supported.
DDL (CREATE TABLE, ALTER TABLE, DROP) is available if the connected user
has %DB_<namespace>:Write privilege. DDL runs outside IRIS class compilation
— changes are visible immediately in SQL but not as compiled classes.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub intersystems-community/iris-agentic-dev --plugin iris-dev40 skills in this plugin
/ensemble-productionManage and observe IRIS Interoperability productions — lifecycle, logs, queues, and message tracing. Covers pyprod Python API, ObjectScript Ens.Director, and MCP tool flow./iris-agentic-devConfigure, connect, and troubleshoot the iris-agentic-dev MCP server (iris_execute/iris_query/iris_doc/docs_introspect/kb/etc.) against an IRIS container or instance. Use when its tools return IRIS_UNREACHABLE, when pointing it at a new IRIS, or when a connection edit "isn't taking effect." Covers the .iris-agentic-dev.toml config, live file-watch reload, the OrbStack port-discovery gotcha, and the docker-exec fallback./iris-agentic-dev-setupOther plugins' skills for the same job