<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm" -->

---
title: Extending Prisma Next with Typed Postgres ltree | daily.dev
description: A community developer built prisma-ltree, an extension pack for Prisma Next that adds typed PostgreSQL ltree support. The post explains why ltree outperforms...
canonical: https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Extending Prisma Next with Typed Postgres ltree | daily.dev
og:description: A community developer built prisma-ltree, an extension pack for Prisma Next that adds typed PostgreSQL ltree support. The post explains why ltree outperforms...
og:url: https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm
og:image: https://api.daily.dev/og/posts/tsSDoFLjm.png
og:image:alt: Extending Prisma Next with Typed Postgres ltree
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Extending Prisma Next with Typed Postgres ltree

**[Prisma Blog](https://daily.dev/sources/prisma-blog)** · 7 min read · 0 upvotes · 0 comments

## Summary

A community developer built prisma-ltree, an extension pack for Prisma Next that adds typed PostgreSQL ltree support. The post explains why ltree outperforms common hierarchy patterns (parent references, text paths, nested sets) for tree-structured data, then walks through a six-step setup: installing the package, registering control and runtime extensions, defining ltree columns in schema, initializing the database, and running typed queries. Key operators covered include isDescendantOf, isAncestorOf, matchesLquery (with lquery wildcard gotchas), and lca (lowest common ancestor). Current limitations include no GiST index declaration in schema — those must be created manually in SQL. Both Prisma Next and prisma-ltree are in Early Access.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.prisma.io/blog/prisma-next-ltree-extension>

## Similar posts on daily.dev

- [Prisma Next Early Access: Write Your Contract, Prompt Your Agent, Ship Your App](https://daily.dev/posts/prisma-next-early-access-write-your-contract-prompt-your-agent-ship-your-app-fkrpmitw2) · Prisma Blog · 10 upvotes · 0 comments
- [Manage a Next.js Monorepo with Prisma](https://daily.dev/posts/manage-a-next-js-monorepo-with-prisma-mfa24in4j) · AppSignal · 3 upvotes · 0 comments
- [New Postgres Language Server: postgres-lsp](https://daily.dev/posts/new-postgres-language-server-postgres-lsp-yok0fzzyu) · PostgreSQL · 46 upvotes · 3 comments
- [How to use Prisma ORM 8 in NestJS: setup, queries, deploy](https://daily.dev/posts/how-to-use-prisma-orm-8-in-nestjs-setup-queries-deploy-q5yb0awlx) · Prisma Blog · 12 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#postgresql](https://daily.dev/tags/postgresql), [#prisma](https://daily.dev/tags/prisma)

[View this post on daily.dev](https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Extending Prisma Next with Typed Postgres ltree","url":"https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm"},"datePublished":"2026-07-20T14:29:56.889Z","dateModified":"2026-07-20T14:30:25.329Z","description":"A community developer built prisma-ltree, an extension pack for Prisma Next that adds typed PostgreSQL ltree support. The post explains why ltree outperforms...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7085557ed2f0ea8e8f739b75bfa2a22c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7085557ed2f0ea8e8f739b75bfa2a22c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Prisma Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Prisma Blog","logo":"https://media.daily.dev/image/upload/s--wjA5CgSL--/f_auto,q_auto/v1780213432/logos/prisma-blog?_a=BAMAMiWQ0","url":"https://daily.dev/sources/prisma-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/extending-prisma-next-with-typed-postgres-ltree-tssdofljm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"typescript,postgresql,prisma","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Prisma Blog","item":"https://daily.dev/sources/prisma-blog"},{"@type":"ListItem","position":3,"name":"Extending Prisma Next with Typed Postgres ltree"}]}
```

