Code Monkey home page Code Monkey logo

Comments (4)

ankane avatar ankane commented on May 24, 2024

Hi @frg01, starting with 0.6.0, pgvector handles this the same way as other Postgres extensions.

If set before the extension is loaded:

SET ivfflat.probess = 1; -- no output

SELECT '[1,2,3]'::vector; -- warning
WARNING:  invalid configuration parameter name "ivfflat.probess", removing it

If set after the extension is loaded:

SELECT '[1,2,3]'::vector; -- load extension

SET ivfflat.probess = 1;
ERROR:  invalid configuration parameter name "ivfflat.probess"
DETAIL:  "ivfflat" is a reserved prefix.

from pgvector.

frg01 avatar frg01 commented on May 24, 2024

Hi @frg01, starting with 0.6.0, pgvector handles this the same way as other Postgres extensions.

If set before the extension is loaded:

SET ivfflat.probess = 1; -- no output

SELECT '[1,2,3]'::vector; -- warning
WARNING:  invalid configuration parameter name "ivfflat.probess", removing it

If set after the extension is loaded:

SELECT '[1,2,3]'::vector; -- load extension

SET ivfflat.probess = 1;
ERROR:  invalid configuration parameter name "ivfflat.probess"
DETAIL:  "ivfflat" is a reserved prefix.

Are you sure this issue has been resolved? The version I use is 0.6.2

postgres=# create extension vector;
ERROR: extension "vector" already exists
postgres=# SELECT extname, extversion
FROM pg_extension;
extname | extversion
---------+------------
plpgsql | 1.0
vector | 0.6.2
(2 rows)

postgres=# SELECT '[1,2,3]'::vector; -- load extension
vector

[1,2,3]
(1 row)

postgres=# SET ivfflat.probess = 1;
SET

I'm not sure if there are other factors causing this phenomenon.

from pgvector.

ankane avatar ankane commented on May 24, 2024

It looks like Postgres 14 and below has different behavior (it was changed in postgres/postgres@8810356). If set before the extension is loaded, there's a warning when it's loaded.

SET ivfflat.probess = 1;

SELECT '[1,2,3]'::vector;
WARNING:  unrecognized configuration parameter "ivfflat.probess"

If set after, there's no error or warning. In any case, this is the same behavior as other extensions.

from pgvector.

frg01 avatar frg01 commented on May 24, 2024

看起来 Postgres 14 及以下版本有不同的行为(在postgres/postgres@ 8810356中进行了更改)。如果在加载扩展之前设置,则加载时会出现警告。

SET ivfflat.probess = 1;

SELECT '[1,2,3]'::vector;
WARNING:  unrecognized configuration parameter "ivfflat.probess"

如果之后设置,则不会出现错误或警告。无论如何,这与其他扩展的行为相同。

got it , thanks for your reply!!

from pgvector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.