Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Vector

Functions related to vector backend management.

set_vector_backend

Toggles the vector implementation used internally. See Internals - Vector Backend for more details.

Returns

  • Type: TEXT

Parameters

backend
  • Description: Specifies which backend to use. If omitted, it switches to the unused backend. Can either be pgvector or default.
  • Type: TEXT
  • Optional: true
  • Default: NULL

Example

-- Switch to default backend
SELECT sqlgen.set_vector_backend('default');

-- Switch to pgvector backend
SELECT sqlgen.set_vector_backend('pgvector');

-- Switch to unused baclemd
SELECT sqlgen.set_vector_backend();