[schemas] Fix typed-reasoning-edges COMMENT syntax error#233
Open
AnkitClassicVision wants to merge 4 commits intoNateBJones-Projects:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove duplicated MyBCAT Universal Rules block from repo CLAUDE.md. Rules are now inherited via /repos/.claude/CLAUDE.md (Claude Code walks up the directory tree). Saves ~1,165 tokens per session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The COMMENT ON FUNCTION public.thought_edges_upsert IS clause used runtime
string concatenation ('...' || '...' || '...') which Postgres rejects —
COMMENT requires a single string literal, not an expression.
Replaced the || operators with SQL-standard adjacent-string-literal
concatenation (the parser joins adjacent 'a' 'b' into 'ab' when separated
only by whitespace), keeping the source readable on multiple lines while
producing a valid literal.
Repros via: supabase db query --linked --file schemas/typed-reasoning-edges/schema.sql
Before: ERROR 42601 syntax error at or near "||"
After: applies cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
COMMENT ON FUNCTION public.thought_edges_upsert ISclause uses runtime string concatenation ('...' || '...' || '...'), which Postgres rejects.COMMENTrequires a single string literal, not an expression.Repro
Apply the schema against Supabase:
Fails with:
Fix
Replaced
||with SQL-standard adjacent-string-literal concatenation — the parser joins adjacent'a' 'b'into'ab'when separated only by whitespace, so the multi-line source stays readable while producing a valid single literal.Test plan
\df+ public.thought_edges_upsertshows the merged description🤖 Generated with Claude Code