On 8/26/15 8:02 PM, Bouke van der Bijl wrote:
Hi,

I'm working on a dialect for Redshift.
you don't need to work on a Redshift dialect. There are already two, though I believe these are going to merge back into each other:

https://pypi.python.org/pypi/sqlalchemy-redshift
https://github.com/binarydud/redshift_sqlalchemy

https://github.com/graingert/redshift_sqlalchemy
https://pypi.python.org/pypi/redshift-sqlalchemy/




Redshift is peculiar in that it doesn't support indexes, instead it saves things in a certain sort order. I'd like to simply ignore any CreateView DDL statement that's executed, but I was wondering how I go about implementing this. I've already tried overwriting visit_create_index in DDLCompiler to return None, but that results in

|
ProgrammingError:(psycopg2.ProgrammingError)can't execute an empty query
|

Is there some built-in way to simply not do anything at all? Should I return something like

|
SELECT 1WHERE FALSE
|
currently ddl.py unconditionally creates a CreateIndex construct for each Index in a Table and visits it, and no hook is given to the Dialect class right now to replace SchemaGenerator. Short of elaborate interception of the SchemaGenerator object, you might as well try to return a SQL comment which at least is more descriptive in SQL logging.



?
--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com <mailto:sqlalchemy+unsubscr...@googlegroups.com>. To post to this group, send email to sqlalchemy@googlegroups.com <mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to