Correctly setting search_path
to include "$user"
#1917
Replies: 2 comments
-
Sequel by default does not use yaml files (outside of bin/sequel), nor does it create Sequel handles this correctly if you pass the search_path Database option, since it treats each option as a quoted identifier. Here's an example using a connection URL:
|
Beta Was this translation helpful? Give feedback.
-
@jeremyevans, thanks for that quick response. I appreciate it. While we are not using Rails, I do see that the schema dumper was picked from |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to set my search path to include the schema
"$user"
. When, indatabase.yml
I set it as so:My database connection sets the
search_path
correctly, but on runningdb:migrate
,schema.rb
gets the following SQL to setsearch_path
:It's missing the quotes for
$user
.Conversely, if I set
search_path
indatabase.yml
toI get the correct SQL in
schema.rb
like so:but my database connection shows
search_path
like this:How can I set search path to use
"$user"
correctly?Beta Was this translation helpful? Give feedback.
All reactions