Skip to content

fix(postgres): remove hardcoded public. schema prefix from GetEnrichment query#1778

Merged
github-actions[bot] merged 1 commit intoquay:mainfrom
dennisandersen-sys:fix/GetEnrichment
Mar 16, 2026
Merged

fix(postgres): remove hardcoded public. schema prefix from GetEnrichment query#1778
github-actions[bot] merged 1 commit intoquay:mainfrom
dennisandersen-sys:fix/GetEnrichment

Conversation

@dennisandersen-sys
Copy link
Contributor

The GetEnrichment query in datastore/postgres/enrichment.go explicitly references public.enrichment, public.uo_enrich, and public.latest_update_operations, bypassing PostgreSQL's search_path resolution.

All other queries in the same file use unqualified table names. This inconsistency causes SQLSTATE 42P01 errors when tables reside in a non-default schema (e.g. when search_path is configured at the database or role level).

This change removes the public. prefix from the three table references, making GetEnrichment consistent with the rest of the codebase.

   -public.enrichment
   +enrichment

   -join public.uo_enrich uo on
   +join uo_enrich uo on

   -join public.latest_update_operations l on
   +join latest_update_operations l on

Fixes issue #1777

Remove explicit public. schema qualification from the GetEnrichment
query. This makes the method consistent with all other queries in the
package, which use unqualified table names resolved via PostgreSQL's
search_path setting.

Signed-off-by: Dennis Andersen <dennis.andersen@fortnox.se>
@dennisandersen-sys dennisandersen-sys requested a review from a team as a code owner March 15, 2026 08:19
@dennisandersen-sys dennisandersen-sys requested review from crozzy and removed request for a team March 15, 2026 08:19
Copy link
Member

@hdonnay hdonnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks! This is definitely the intent of what should be happening.

@hdonnay
Copy link
Member

hdonnay commented Mar 16, 2026

/fast-forward

@github-actions github-actions bot merged commit 0e3e83c into quay:main Mar 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants