pg_search_columns
Search across all user schemas for columns matching a pattern, using SQL LIKE wildcards. Identifies which tables contain a specific column.
Instructions
Search for columns by name across all user schemas. Supports SQL LIKE patterns (% matches any substring, _ matches one character). Case-insensitive. Use this instead of iterating pg_describe_table when the user asks 'which tables have X'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default 100). | |
| schema | No | Limit to this schema. If omitted, searches all user schemas. | |
| pattern | Yes | LIKE pattern. Use '%' for wildcard: 'user_id', '%email%', 'created_%'. |