This tripped us up for a bit 😉
When I pass a symbol in as a value, I expect it to be treated like a string, so single quotes. However, it is parsed as a double quoted/escaped string, which in Postgres causes
Sequel::Database Error: PG::Error: column "foos" does not exist
Here's an example of what we were working with
[:x_target_id, :target_id, :target_type],
[['@foo:asdf', 459, :foos]]
=> ["INSERT INTO \"targets\" (\"x_target_id\", \"target_id\", \"target_type\") VALUES ('@foo', 459, \"foos\")"]
I would expect that last "foos" to be 'foos'.
sequel 3.39.0, sequel_pg 1.6.0, and pg 0.14.1
This behavior is by design. In Sequel, symbols represent SQL identifiers, not SQL strings. Your expectation would break the case where you want to set a column value to the current value of another column, and would be inconsistent with the rest of Sequel.
OK, that's understandable. Simple fix for us too. Thanks!