I have the following:
(byebug) puts DB.from(:users).select("email").sql
SELECT 'email' FROM "users"
The problem is that the DB doesn't accept that SQL, because the table name
is quoted.
(byebug) DB[DB.from(:users).select("email").sql].each { |r| puts r }
*** Sequel::DatabaseError Exception: PG::UndefinedTable: ERROR: relation
"users" does not exist
The query works just fine manually if the table name is bare.
The DB is RedShift. I don't have a PG database hooked up to test with, but
maybe this is a quirk of Redshift that the redshift adapter doesn't handle
properly?
I feel like I'm missing something obvious here. Is there any way to get
the table name not to be quoted?
-Will
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.