Home / Companies / Neon / Blog / Post Details
Content Deep Dive

pg_redact: Content-aware PII redaction with Jev, enforced in Postgres

Blog post from Neon

Post Details
Company
Date Published
Author
Rishi Raj Jain
Word Count
2,292
Company Posts That Month
11
Language
English
Hacker News Points
1
Post removed?
No
Summary

pg_redact is a demonstration support-inbox application that addresses the limitations of column-level PostgreSQL privacy controls by detecting and masking personally identifiable information embedded within free-text messages. It generates possible PII spans using regex and tokenization rules, then sends those candidates with their surrounding message context to TypeSafe’s Jev classification model, which labels items such as names, emails, addresses, phone numbers, and identification numbers while filtering low-confidence results. The application stores the original message and classified spans in PostgreSQL JSONB fields, where SQL functions assign sensitivity levels to PII types and redact content according to role-based clearance levels: guests see no detected PII, support agents can see lower-sensitivity identifiers such as names and emails, and administrators see all content. By separating classification from database-side enforcement, the system allows clearance and sensitivity policies to change without reclassifying stored messages, while preserving useful non-PII details such as invoice numbers that simple pattern matching might otherwise conceal.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Jev 26 1,248 94 53 -42%
Vector Search 1 1,949 405 130 +17%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.