Re: BUG #18065: An error occurred when attempting to add a column of type "vector" to a table named "vector".

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "a17764530215(at)gmail(dot)com" <a17764530215(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18065: An error occurred when attempting to add a column of type "vector" to a table named "vector".
Date: 2023-08-22 13:45:30
Message-ID: CAKFQuwZvf7tjZG7QABNdRjd8xkV4q9JJ=eNrtc24fimBp9rspw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tuesday, August 22, 2023, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > On Tuesday, August 22, 2023, PG Bug reporting form <
> noreply(at)postgresql(dot)org>
> > wrote:
> >> When I run:
> >> create table if not exists "vector" ();
> >> alter table "vector" add column if not exists "fz_vector1_embedding"
> >> vector(1536);
> >> I got an error:
> >> ERROR: type modifier is not allowed for type "vector"
> >> LINE 1: ..." add column if not exists "fz_vector1_embedding"
> vector(153...
>
> > You are in the wrong place, core doesn’t have this type.
>
> I think it's basically a search path problem: the table's composite type
> "vector" is masking the extension's type. Try schema-qualifying "vector"
> with the appropriate schema name.
>
>
Right. Though my conclusion is this is why you don’t name a table
something as generic as “vector”. But still one should schema-qualify
their use of extension types anyway.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Greene 2023-08-22 15:31:38 Re: BUG #18061: The psql -v variable option does not work for the -c command option
Previous Message Tom Lane 2023-08-22 13:26:45 Re: BUG #18065: An error occurred when attempting to add a column of type "vector" to a table named "vector".