From a1f8a18b03b3ac080385c8b23ebb2d5975aae3f7 Mon Sep 17 00:00:00 2001 From: "Edgeshot@27" Date: Tue, 4 Aug 2026 19:58:23 +0530 Subject: [PATCH] docs: add missing ::regclass cast error to troubleshooting --- docs/user_guide/troubleshooting.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/user_guide/troubleshooting.mdx b/docs/user_guide/troubleshooting.mdx index 09f05694..c8775b7d 100644 --- a/docs/user_guide/troubleshooting.mdx +++ b/docs/user_guide/troubleshooting.mdx @@ -2,6 +2,27 @@ Use this page to map symptoms to status checks and recovery actions. +## Function Does Not Exist (Type Cast Error) + +Symptom: + +```text +ERROR: function graph.add_table(unknown, unknown) does not exist +HINT: No function matches the given name and argument types. You might need to add explicit type casts. +``` + +Check: + +Are you passing a table name as a plain string, such as `'public.users'`? + +Fix: + +pgGraph's table registration functions require PostgreSQL Object Identifiers (OIDs), not plain text strings. Add the `::regclass` cast to the table name argument: + +```sql +SELECT graph.add_table('public.users'::regclass, 'id'); +``` + ## Graph Not Built Symptom: