On Feb 16, 2007, at 3:18 AM, Troy wrote:

>
> Is there a way in the format_column method of ANSIIdentifierPreparer
> to determine if the column is part of the select clause, where clause,
> order clause, etc?
>
> What I'm attempting to do is override the default postgres dialect to
> format string columns as 'lower(colname)' only when the column is not
> being used as part of the select clause.

i suppose this is not terribly hard since it would just mean some  
extra argument passed along.  of course the question is *why* would  
you need this.  if its some kind of case-insensitive resultproxy  
issue, id rather do something on that end.

> Also, if interested, I can submit a patch to url.py that imports the
> dialect from the full module path if the dialect is not found.  This
> would allow someone to override a dialect, or create a proprietary new
> one and not have to worry about the dialect residing in alchemy's
> databases module, i.e. :
>
> pg_db = create_engine('myapp.database.postgres:// 
> scott:[EMAIL PROTECTED]:
> 5432/mydatabase')

so the rule would be, look for an SA dialect first, else try to  
import module ?    would we want to do this in a more indirect way,  
i.e. "register_dialect("postgres", mydialect)" so that one can  
install custom dialects across the board for a given type ?



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to