Giter VIP home page Giter VIP logo

Comments (4)

usamoi avatar usamoi commented on June 9, 2024

It'll be fixed in next version and you could use

CREATE OR REPLACE VIEW pg_vector_index_stat AS
    SELECT
        C.oid AS tablerelid,
        I.oid AS indexrelid,
        C.relname AS tablename,
        I.relname AS indexname,
        (_vectors_index_stat(I.oid)).*
    FROM pg_class C JOIN
         pg_index X ON C.oid = X.indrelid JOIN
         pg_class I ON I.oid = X.indexrelid JOIN
         pg_am A ON A.oid = I.relam
    WHERE A.amname = 'vectors' AND C.relkind = 'r';

to fix the behavior in current version.

from pgvecto.rs.

ydylla avatar ydylla commented on June 9, 2024

Thanks for the quick reply @usamoi.
I tried your workaround but now I get a different error [XX000] ERROR: oid_ is null and even the query that previously did work now no longer works. Somehow I bricked it 😅 since even going back to the view without the AND C.relkind = 'r' fix is now broken. I guess I have to reinstall the extension, luckily it's just a test setup.

from pgvecto.rs.

usamoi avatar usamoi commented on June 9, 2024

Thanks for the quick reply @usamoi. I tried your workaround but now I get a different error [XX000] ERROR: oid_ is null and even the query that previously did work now no longer works. Somehow I bricked it 😅 since even going back to the view without the AND C.relkind = 'r' fix is now broken. I guess I have to reinstall the extension, luckily it's just a test setup.

Feel sorry for it. I forgot that the view is changed in development branch since v0.2.1.

If you are using v0.2.1,

CREATE OR REPLACE VIEW pg_vector_index_stat AS
    SELECT
        C.oid AS tablerelid,
        I.oid AS indexrelid,
        C.relname AS tablename,
        I.relname AS indexname,
        (_vectors_index_stat(I.relfilenode)).*
    FROM pg_class C JOIN
         pg_index X ON C.oid = X.indrelid JOIN
         pg_class I ON I.oid = X.indexrelid JOIN
         pg_am A ON A.oid = I.relam
    WHERE A.amname = 'vectors' AND C.relkind = 'r';

should work.

from pgvecto.rs.

ydylla avatar ydylla commented on June 9, 2024

It still produces the same error. But don't worry I will just reinstall the extension.

from pgvecto.rs.

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.