intersystems-community/iris-agentic-dev/iris-pgwire

Claude Code and agent skill by intersystems-community/iris-agentic-dev

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when connecting to IRIS via the PostgreSQL wire protocol, using psycopg3 or any Postgres-compatible client

Install

npx vskill@latest install intersystems-community/iris-agentic-dev/iris-pgwire

SKILL.md

iris-pgwire

Project: iris-pgwire Status: community preview Requires: IRIS 2024.1+; iris-pgwire package installed via ZPM

What it does

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:

  • You're deploying to an environment where the IRIS Python gateway isn't

available (AWS Lambda, Docker minimal images, etc.)

  • You want to use standard Postgres tooling (psql, pgAdmin, dbt)
  • Your library requires a Postgres connection and you can't swap drivers

When to use this vs the alternatives

ScenarioPreferred driver
Python inside IRIS (Embedded Python)iris native module
Python outside IRIS, full IRIS APIintersystems-irispython
Python outside IRIS, SQL only, no depsiris-pgwire + psycopg3
Java / SpringJDBC (com.intersystems.jdbc.IRISDriver)
Standard Postgres toolingiris-pgwire

See the iris-connectivity skill for the full connection-options table.

Install

bash
# On the IRIS instance
zpm "install iris-pgwire"

The package starts a listener on port 5432 (configurable via CPF). No IRIS restart required.

Connection string

text
postgresql://username:password@host:5432/NAMESPACE

The database name in the connection string maps to the IRIS namespace (case-insensitive, uppercased internally).

python
import psycopg
conn = psycopg.connect(
"postgresql://_SYSTEM:SYS@localhost:5432/USER"
)

Or with keyword arguments:

python
conn = psycopg.connect(
host="localhost",
port=5432,
dbname="USER", # IRIS namespace
user="_SYSTEM",
password="SYS",
)

psycopg3 usage pattern

python
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:

python
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()

Key gotchas

Parameter style: %s only

iris-pgwire speaks the PostgreSQL extended query protocol. Use %s placeholders, not ? (ODBC style) or :name (named style).

python
# Correct
cur.execute("SELECT * FROM Foo WHERE ID = %s", (42,))
# Wrong — do not use
cur.execute("SELECT * FROM Foo WHERE ID = ?", (42,))
Type mapping
IRIS typePython type returned
%Stringstr
%Integerint
%Doublefloat
%Datedatetime.date
%TimeStampdatetime.datetime
%Booleanbool
%Liststr (encoded form)
Stream / clobstr (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.

Transaction semantics

iris-pgwire exposes IRIS SQL transactions via the standard Postgres autocommit/explicit-transaction model:

  • autocommit off (psycopg3 default): each statement runs inside a

transaction; call conn.commit() or conn.rollback() explicitly.

  • autocommit on: each statement commits immediately (matches IRIS default

SQL behavior).

IRIS does not support SAVEPOINT — nested transactions will error. Use flat transactions only.

python
conn.autocommit = False
try:
cur.execute("INSERT INTO MyTable (Name) VALUES (%s)", ("Alice",))
conn.commit()
except Exception:
conn.rollback()
raise
Namespace isolation

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 support

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.

Reference

options table (JDBC, ODBC, irispython DBAPI, native API)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/intersystems-community/iris-agentic-dev/iris-pgwire/badge)](https://verified-skill.com/skills/intersystems-community/iris-agentic-dev/iris-pgwire)

Something wrong with this skill or its page? Tell us.