[sqlalchemy] Re: Dialect & default schema
I'm going to reply here, as I can't seem to login to trac again. I did manage to get comments in for #685 #679 - committed in r3050 #684 - committed in r3051 #685 - needs more discussion see the Trac comments Thanks for the patches! Rick On 7/26/07, Christophe de VIENNE <[EMAIL PROTECTED]> wrote: > > > 2007/7/26, Christophe de VIENNE <[EMAIL PROTECTED]>: > > Last thing : could someone tell me if the patches I posted for mssql > > looks 'commitable', because I'd prefer fixing those if needed before > > continuing my failing unit-tests slow (one per day) review. > > Forgot the ticket numbers, sorry : > http://www.sqlalchemy.org/trac/ticket/679 > http://www.sqlalchemy.org/trac/ticket/684 > http://www.sqlalchemy.org/trac/ticket/685 > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Dialect & default schema
Thanks for the commits I didn't say my last word for #685... I'll be back ! Christophe 2007/7/26, Rick Morrison <[EMAIL PROTECTED]>: > I'm going to reply here, as I can't seem to login to trac again. I did > manage to get comments in for #685 > > #679 - committed in r3050 > #684 - committed in r3051 > #685 - needs more discussion see the Trac comments > > Thanks for the patches! > Rick > > > > > On 7/26/07, Christophe de VIENNE <[EMAIL PROTECTED]> wrote: > > > > 2007/7/26, Christophe de VIENNE <[EMAIL PROTECTED] >: > > > Last thing : could someone tell me if the patches I posted for mssql > > > looks 'commitable', because I'd prefer fixing those if needed before > > > continuing my failing unit-tests slow (one per day) review. > > > > Forgot the ticket numbers, sorry : > > http://www.sqlalchemy.org/trac/ticket/679 > > http://www.sqlalchemy.org/trac/ticket/684 > > http://www.sqlalchemy.org/trac/ticket/685 > > > > > > > > > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Dialect & default schema
Hi Rick, Thanks for the explanations. My confusion between database and schema comes from how there words are inter-changeable in mysql. I'll rethink all of that later, and make sure I understand it correctly before proposing a patch. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Dialect & default schema
Thanks for having a look at the tests, Christophe. Responses below: The reason is that MSSQLDialect.get_default_schema_name takes no > argument, while the unittext gives it an engine. The Mssql dialect, > for example, does take an argument. It looks to me like get_default_schema_name() has recently been refactored a bit: it previously took no parameters. For some reason, the MSSQL module (and from the looks of things, the mysql module as well) were not updated. Not sure I follow your second sentence here. Having a closer look at MSSQLDialect.get_default_schema_name , it > simply returns self.schema_name, which is initialised in __init__ with > the value "dbo". This is were I don't know what to think. Isn't the > default schema depending on the connection ? If so why is it > initialized to "dbo" ? No, the *current* schema is dependent on connection. The default schema is what you get if you don't specify anything else. For MSSQL the default schema is "dbo" (short for DabaseBaseOwner). More on that below. Another strange thing : MSSQLDialect defines a > set_default_schema_name, and it's the only dialect to do that. That was by user request, see the archives. Before patching this in the wrong way, I'd like to have a little bit > more details on how the default_shema stuffs are supposed to work. > Sub-question : shouldn't the set_default_schema_name issue a "USE " > ? No, you're confusing schemas and databases. Use sets a current database name, not a current schema. Search the archives again for previous discussion of schemas on MSSQL. There's been confusion in the past between the terms "owner" and "schema". MSSQL and (some) other databases support a three-level namespace: select * from .. Confusingly, in earlier documentation (pre MSSQL-2005) for MSSQL, Microsoft would refer to the middle name as an "owner": select * from .. That middle name, whatever you want to call it, has a system default if not explicitly specified. That's what get_default_schema_name() is supposed to return, or at least that's my understanding of it. Last thing : could someone tell me if the patches I posted for mssql > looks 'commitable', because I'd prefer fixing those if needed before > continuing my failing unit-tests slow (one per day) review. I'll have a look and reply in the tickets themselves. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Dialect & default schema
2007/7/26, Christophe de VIENNE <[EMAIL PROTECTED]>: > Last thing : could someone tell me if the patches I posted for mssql > looks 'commitable', because I'd prefer fixing those if needed before > continuing my failing unit-tests slow (one per day) review. Forgot the ticket numbers, sorry : http://www.sqlalchemy.org/trac/ticket/679 http://www.sqlalchemy.org/trac/ticket/684 http://www.sqlalchemy.org/trac/ticket/685 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---