yeah quote() is always there and should do whatever the dialect thinks it 
should.


On Oct 22, 2012, at 12:20 PM, Stefan Urbanek wrote:

> Thanks. So it would be safe to do it as:
> 
> table_ref = "%s.%s" % (preparer.quote(schema_name, None), 
> preparer.quote(table_name, None))
> 
> to make: "a schema"."a table"?
> 
> Can I assume that this syntax same for all dialects?
> 
> Stefan
> 
> On Monday, October 22, 2012 9:50:14 AM UTC-5, Michael Bayer wrote:
> there's the quote() method which doesn't expect any schema object, just the 
> name and a flag "force" which you can leave as None to have it determine 
> quoting automatically.
> 
> On Oct 22, 2012, at 12:58 AM, Stefan Urbanek wrote:
> 
>> Hi,
>> 
>> I am creating some custom compiled constructions and I need to create 
>> properly quoted schema and table, however I have both only as strings 
>> because the table does not exist yet (for example: CREATE TABLE ... AS 
>> SELECT ...). It looks like all table quote_* methods in IdentifierPreparer 
>> expect table object. Is there a way how can I get schema.table quoting just 
>> from strings?
>> 
>> Regards,
>> 
>> Stefan
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sqlalchemy" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/sqlalchemy/-/5SJoREJHKTkJ.
>> To post to this group, send email to sqlal...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> sqlalchemy+...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/sqlalchemy?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/sqlalchemy/-/u7HrZKAlgIUJ.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to