Know your speaker

Profile Image

Sargam Poudel

Other, spotsnow

Professional Biography

Sargam Poudel is a software engineer with three years of experience building and consulting for early-stage startups. He works across the full stack, from product backends and databases to cloud infrastructure and deployment, helping small teams go from idea to production quickly and reliably. He is especially interested in pragmatic engineering: choosing boring, dependable tools like PostgreSQL and making them scale with the business.

Sessions

session

Trust the database not the AI agent

In this live-coded talk, we start with a fresh PostgreSQL instance and an AI agent with broad database access, and watch it fail. Then we add PostgreSQL's own protections one at a time and run the same prompts again: constraints, transactions, roles, Row-Level Security and narrowly scoped functions. Even if an agent is unreliable, the database makes sure it can't break the rules that matter.

AI agents can now query and change your database for your users. They're also nondeterministic: they hallucinate, misread instructions, fall for prompt injection and retry things they shouldn't. A system prompt that says "don't do that" is not a security boundary.
You'll leave knowing which rules belong in the database, which belong in the application, and where you still need a human in the loop.

What you'll learn

  • Why prompts aren't guardrails, and why AI-generated SQL can't be trusted
  • How CHECK constraints, transactions and idempotency keys stop overdrafts, half-finished transfers and duplicate actions
  • How Row-Level Security keeps even a prompt-injected agent out of another tenant's data
  • How to replace raw SQL access with a restricted role and scoped functions like transfer_money()
  • What the database can't protect you from: valid actions the user never intended, and when to require human approval

All times are in