On Sunday, September 11, 2016 at 2:22:32 PM UTC-7, Will Koffel wrote:
>
> 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?
>
 
DB.quote_identifiers = false

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.

Reply via email to