On Friday, April 27, 2018 at 5:07:07 AM UTC-7, Pd Dzaic wrote: > > Hallo > > I'm doing my first steps with Ruby and Sequel and would like know how to > use a schema when connecting to the database. > > My first steps are: > > require 'sequel'require 'pg' > > DB = Sequel.postgres(host: 'localhost, > port: 1234, > database: 'test', > search_path: 'abc', > user: 'postgres', > password: 'xyz') > > table_01 = DB[:tab01] > > But this does not work. When I look inside the SQL-statement generated by > the sequel-library, the schema is missing. >
:search_path does not automatically qualify tables with the schema given, it sets the schemas that PostgreSQL will look in for tables that are not schema qualified. If you run with a Database logger, you should see a `SET search_path = ...` query issued for all new database connections. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to sequel-talk+unsubscr...@googlegroups.com. To post to this group, send email to sequel-talk@googlegroups.com. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.