Commit c74f4f1
fix(postgres): install pgvector extension into default schema (#1979)
The connector previously installed pgvector via
`CREATE EXTENSION IF NOT EXISTS vector WITH SCHEMA "<pg_schema_name>"`,
which placed the `vector` type inside the table's schema. The subsequent
`CREATE TABLE` / `ALTER TABLE` then referenced the unqualified `vector(N)`
type and failed with `type "vector" does not exist` because the table's
schema is not on the default `search_path`.
Extensions are a database-wide resource, so the right model is to install
into the extension's default schema (typically `public`, already on
`search_path`) regardless of where the target table lives.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6f8a71d commit c74f4f1
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
965 | 964 | | |
966 | 965 | | |
967 | 966 | | |
968 | 967 | | |
969 | | - | |
970 | | - | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
971 | 973 | | |
972 | | - | |
973 | | - | |
| 974 | + | |
974 | 975 | | |
975 | 976 | | |
976 | 977 | | |
| |||
989 | 990 | | |
990 | 991 | | |
991 | 992 | | |
992 | | - | |
| 993 | + | |
993 | 994 | | |
994 | 995 | | |
995 | 996 | | |
| |||
1025 | 1026 | | |
1026 | 1027 | | |
1027 | 1028 | | |
1028 | | - | |
| 1029 | + | |
1029 | 1030 | | |
1030 | 1031 | | |
1031 | 1032 | | |
| |||
0 commit comments