-1

I want to use langchain's SQLAgent with my database PostgreSQL, the default schema is public, I want to use my schema like 'my_schema', what should I do?

I've tried splicing search_path=my_schema after the connection address but I get an error message: no parameters defined

blackzzz
  • 1
  • 1

1 Answers1

0

You can use two ways for use schema

  1. Using search_path like below (documents)
SET search_path TO my_schema,public;

After set search path using SHOW search_path; to show your search path

  1. Using schema name behind table or DDL object
select * from my_schema.table

create table my_schema.test (...)


Pooya
  • 2,968
  • 2
  • 12
  • 18