Re: Can't create a table with vector type as a non-super user - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Can't create a table with vector type as a non-super user
Date
Msg-id 01e5ec17-de91-4197-81d2-fa505802ab57@aklaver.com
Whole thread Raw
In response to Can't create a table with vector type as a non-super user  (mrudula attili <mrudula.attili@gmail.com>)
Responses pg_hint_tables
List pgsql-general

On 9/30/25 6:35 AM, mrudula attili wrote:
> Hello Team,
> 
> 

> Concern:
> As its a production environment, we are not really happy to give away 
> the usage on public schema.
> 
> Is there a way we could get the end users make use of the extension 
> without granting usage on public schema

In addition to what Tom Lane suggested:

https://github.com/pgvector/pgvector/blob/master/vector.control

relocatable = true

And per here:

https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-RELOCATION

"
A fully relocatable extension can be moved into another schema at any 
time, even after it's been loaded into a database. This is done with the 
ALTER EXTENSION SET SCHEMA command, which automatically renames all the 
member objects into the new schema. Normally, this is only possible if 
the extension contains no internal assumptions about what schema any of 
its objects are in. Also, the extension's objects must all be in one 
schema to begin with (ignoring objects that do not belong to any schema, 
such as procedural languages). Mark a fully relocatable extension by 
setting relocatable = true in its control file.
"

You could move the extension to a schema that the users do have usage on.

> 
> 
> Thanks,
> SA
> 
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can't create a table with vector type as a non-super user
Next
From: "Wong, Kam Fook (TR Technology)"
Date:
Subject: pg_hint_tables