Add subquery alias to support older versions of Postgres

Created on 22 May 2025, 16 days ago

As described here: https://pganalyze.com/blog/5mins-postgres-waiting-for-postgres-16-subque... versions of Postgres prior to 17 required an alias for subqueries. This is the case when I tried using the pgvector Postgres support within Supabase.

Without this patch, doing a query to the VDB gives the error:

ERROR: subquery in FROM must have an alias LINE 1: ...drupal_entity_id","drupal_long_id","content" FROM (SELECT em... ^ HINT: For example, FROM (SELECT ...) [AS] foo.
Of the following exception type:
Drupal\ai_vdb_provider_postgres\Exception\VectorSearchException

I am uploading a simple patch to fix this. After applying the patch it all started working for me.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mpotter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024