[sqlalchemy] ticket #877

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would like to write a patch for ticket #877. What is the best method to implement the requested feature? The ExecutionContext class has a post_exec method, so the implementation for the psycopg2 driver can override this method, check for the

Re: [sqlalchemy] Re: Literal table expression (VALUES clause) in select

2010-02-28 Thread Michael Bayer
On Feb 26, 2010, at 6:28 AM, Gunnlaugur Briem wrote: This produces the equivalent SELECT ... UNION ALL ... UNION ALL ... using select, literal_column and union_all (and leaving aside the details of representing the literal values inside the VALUES clause) --- works just fine and PostgreSQL

Re: [sqlalchemy] ticket #877

2010-02-28 Thread Michael Trier
On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote: By the way, it seems there is a bug in the documentation: http://www.sqlalchemy.org/docs/reference/sqlalchemy/connections.html?highlight=create_engine#sqlalchemy.create_engine echo=False – if True, the Engine will log all statements as well

Re: [sqlalchemy] ticket #877

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote: I would like to write a patch for ticket #877. What is the best method to implement the requested feature? The ExecutionContext class has a post_exec method, so

Re: [sqlalchemy] ticket #877

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote: I would like to write a patch for ticket #877. Sorry, I forgot to update the log level used in the patch (I was doing some tests with the engine `echo` parameter).

Re: [sqlalchemy] ticket #877

2010-02-28 Thread Michael Bayer
On Feb 28, 2010, at 12:33 PM, Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote: I would like to write a patch for ticket #877. What is the best method to implement the requested feature?

[sqlalchemy] bug in DROP TABLE CASCADE

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 When reading the code in the `sql.compiler` module, I noted this: def visit_drop_table(self, drop): ret = \nDROP TABLE + self.preparer.format_table(drop.element) if drop.cascade: ret += CASCADE CONSTRAINTS

[sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have found that some tests fails: http://paste.pocoo.org/show/184048/ The problem is with the match operarator for fulltext search. I'm using PostgreSQL 8.4. By the way, I have also noted that in the SQLAlchemy source code there are many extra

Re: [sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Rami Chowdhury
On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have found that some tests fails: http://paste.pocoo.org/show/184048/ Are you using the latest SVN? I don't get any of those test failures PostgreSQL 8.4.2, rev 6878 The problem

[sqlalchemy] some question about SQLAlchemu development

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I recently wrote my first big patch for SQLAlchemy: http://www.sqlalchemy.org/trac/attachment/ticket/1679/schema.patch and I have some questions about the source code. * Why objects like Sequence have a `__visit_name__ = 'sequence'`, and the

Re: [sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rami Chowdhury ha scritto: On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote: I have found that some tests fails: http://paste.pocoo.org/show/184048/ Are you using the latest SVN? I'm using the mercurial mirror. Changeset

Re: [sqlalchemy] ticket #877

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: Done, new patch attached. The is also a bug fix: I forgot to clear the notices list. The notices list is cleared *only* if messages are actually logged. I took the liberty to change the coding style, too. If patch

Re: [sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Rami Chowdhury
On Feb 28, 2010, at 15:17 , Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rami Chowdhury ha scritto: On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote: I have found that some tests fails: http://paste.pocoo.org/show/184048/ Are you using the latest SVN?

[sqlalchemy] incorrect behaviour with primary key constraint and integer columns

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I think that SQLAlchemy behaves incorrectly when there is a primary key constraint on multiple columns and one of the columns is of type Integer. ## from sqlalchemy import schema, types, create_engine metadata = schema.MetaData() test =

Re: [sqlalchemy] some question about SQLAlchemu development

2010-02-28 Thread Michael Bayer
On Feb 28, 2010, at 5:05 PM, Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I recently wrote my first big patch for SQLAlchemy: http://www.sqlalchemy.org/trac/attachment/ticket/1679/schema.patch and I have some questions about the source code. * Why

Re: [sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Michael Bayer
On Feb 28, 2010, at 4:32 PM, Manlio Perillo wrote: By the way, I have also noted that in the SQLAlchemy source code there are many extra whitespaces (lines with only whitespaces, or lines ending with whitespaces), that are usually (?) considered bad programming practice. lines ending with

Re: [sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rami Chowdhury ha scritto: On Feb 28, 2010, at 15:17 , Manlio Perillo wrote: Rami Chowdhury ha scritto: On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote: I have found that some tests fails: http://paste.pocoo.org/show/184048/ Are you

Re: [sqlalchemy] some question about SQLAlchemu development

2010-02-28 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: [...] * I have noted that some database objects not directly attached to a metadata, like a Sequence, can leave the database in an inconsistent state if the associated test suite fails. I have the same problem with

Re: [sqlalchemy] failures in the test suite for match operator in PostgreSQL 8.4

2010-02-28 Thread Michael Bayer
On Feb 28, 2010, at 8:01 PM, Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rami Chowdhury ha scritto: On Feb 28, 2010, at 15:17 , Manlio Perillo wrote: Rami Chowdhury ha scritto: On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote: I have found that some

Re: [sqlalchemy] bug in DROP TABLE CASCADE

2010-02-28 Thread Michael Bayer
On Feb 28, 2010, at 8:09 PM, Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: On Feb 28, 2010, at 3:21 PM, Manlio Perillo wrote: When reading the code in the `sql.compiler` module, I noted this: def visit_drop_table(self, drop):

Re: [sqlalchemy] some question about SQLAlchemu development

2010-02-28 Thread Michael Bayer
On Feb 28, 2010, at 8:12 PM, Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: [...] * I have noted that some database objects not directly attached to a metadata, like a Sequence, can leave the database in an inconsistent state if the