You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
308_function_search_path.sql blanket-runs ALTER FUNCTION ... SET search_path = <own schema> over every function it owns, discarding whatever search_path the function was actually written with. It clobbered 37 functions. PostGIS lives in public, so any function resolving geometry / ST_* / similarity() unqualified now fails.
ERROR: type "geometry" does not exist
LINE 9: ST_X(j.geo::geometry) AS longitude,
Confirmed broken
Verified individually against a local DB. The other 32 clobbered functions fully-qualify their references and are unaffected.
Function
Declared
Now
Impact
core.get_jobs_with_coords
core, public
core
/workers/map job layer (the reported error)
core.get_organizations_with_coords
core, public
core
/workers/map org layer
core.check_site_overlaps
core, public
core
project site geo validation
core.validate_address_in_site
core
core
project address validation
onet.search_occupations
—
onet
similarity(), career-assessment occupation search
Fix
New migration restoring a correct search_path on the 5 functions above.
List bothpublic and extensions — 309_move_extensions_to_extensions_schema.sqltries to move PostGIS to extensions and silently no-op'd locally (extension ownership), so the repair has to survive both states.
Make 308 itself append to the existing search_path rather than overwrite, or it re-clobbers the fix on any re-run.
Fixed by #448 (merged). Migration 341 repairs search_path on all 5 broken functions, 308 no longer overwrites a declared search_path, and 341's verification block additionally caught the onet.search_occupations return-type mismatch.
Verified: full supabase db reset applies the chain clean, 341 is idempotent, get_jobs_with_coords returns 11 pins and get_organizations_with_coords 9, occupation search ranks correctly.
Follow-up filed as #468 — 10 functions from migrations 314–325 have no search_path at all, having been created after 308 ran.
Activity
fix(db): repair search_path clobbered by migration 308 (#448)
thinkclay commentedon Jul 30, 2026
Fixed by #448 (merged). Migration 341 repairs search_path on all 5 broken functions, 308 no longer overwrites a declared search_path, and 341's verification block additionally caught the
onet.search_occupationsreturn-type mismatch.Verified: full
supabase db resetapplies the chain clean, 341 is idempotent,get_jobs_with_coordsreturns 11 pins andget_organizations_with_coords9, occupation search ranks correctly.Follow-up filed as #468 — 10 functions from migrations 314–325 have no search_path at all, having been created after 308 ran.