Can't create a table with vector type as a non-super user

From: mrudula attili <mrudula(dot)attili(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Can't create a table with vector type as a non-super user
Date: 2025-09-30 13:35:06
Message-ID: CACmLaviY60Vx64hcacS687kBA3tXRfcYzrSJb6XaHU4X5qOrmQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Team,

I have recently installed the pgvector extension on one of our production
databases.
Managed to create the extension as super user and create table with the
vector type.

But a non super user (a read write user of the database) is not able to
create a table with vector type and keeps getting the below error.

CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3))
[2025-09-30 09:22:29] [42704] ERROR: type "vector" does not exist
[2025-09-30 09:22:29] Position: 57

Actions taken:

1. Granted usage of type vector to user

- No luck

2. Granted usage on schema public to user

- Worked

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

Thanks,
SA

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2025-09-30 13:39:24 Re: encoding problem while inictial copy in logical replication
Previous Message Ron Johnson 2025-09-30 13:12:11 Re: Downgrade pgsql 17 to pgsql 12 question