[sqlalchemy] Re: PrimaryKeyConstraint appears out of nowhere

2009-11-05 Thread Wolodja Wentland
On Thu, Nov 05, 2009 at 19:07 -0500, Michael Bayer wrote: it would be an empty PrimaryKeyConstraint. It serves as the primary_key column collection on the table object. Thanks for clarifying this. Are there any plans to reflect the names of Constraints in 0.6? That would ease the removal of

[sqlalchemy] Re: TypeError raised when executing INSERT statement

2009-11-03 Thread Wolodja Wentland
On Tue, Nov 03, 2009 at 16:29 -0500, Michael Bayer wrote: the error is raised directly by psycopg2. I was afraid that the error is with psycopg2. Are you aware of any bugtracker, mailing list or IRC channel that discusses psycopg2? I'd try taking out the ; at the end of the statement, That

[sqlalchemy] Re: TypeError raised when executing INSERT statement

2009-11-03 Thread Wolodja Wentland
On Tue, Nov 03, 2009 at 21:57 +0100, Wolodja Wentland wrote: psql_engine = create_engine( 'postgresql+psycopg2://babilen:ax8xwymferm...@localhost/typeerr_bug') ^^ oops Note to self: Double check for sensitive data :-). Guess it is time

[sqlalchemy] Re: TypeError raised when executing INSERT statement

2009-11-03 Thread Wolodja Wentland
On Tue, Nov 03, 2009 at 22:49 +0100, Wolodja Wentland wrote: On Tue, Nov 03, 2009 at 16:29 -0500, Michael Bayer wrote: the error is raised directly by psycopg2. I was afraid that the error is with psycopg2. Are you aware of any bugtracker, mailing list or IRC channel that discusses psycopg2

[sqlalchemy] TypeError raised when executing INSERT statement

2009-11-03 Thread Wolodja Wentland
: --- snip --- $ psql -d typeerr_bug insert_stmt.sql INSERT 0 32173 --- snip --- What is causing this behaviour and even more importantly: What can I do about it? kind regards Wolodja Wentland signature.asc Description: Digital signature

[sqlalchemy] Create database and transactional blocks strangeness

2009-10-27 Thread Wolodja Wentland
Hi all, I am having a problem getting database creation on PostgreSQL done correctly in an API that I am writing. I am using a svn checkout of SA trunk from yesterday if that is important. I have use the following code to create the database: --- snip --- ... try: import psycopg2.extensions

[sqlalchemy] Re: Create database and transactional blocks strangeness

2009-10-27 Thread Wolodja Wentland
On Tue, Oct 27, 2009 at 16:22 -0400, Michael Bayer wrote: Wolodja Wentland wrote: def create(self): Create this database # set isolation level to AUTOCOMMIT # postgres can't CREATE databases within a transaction self._admin_engine.connect

[sqlalchemy] Re: Very odd utf8 problem

2009-10-07 Thread Wolodja Wentland
with IPython it is wise to check the 'python' behaviour before development code against this bug. kind regards Wolodja Wentland signature.asc Description: Digital signature

[sqlalchemy] Re: Dynamic loader versus lazy=True

2009-09-15 Thread Wolodja Wentland
On Thu, Sep 10, 2009 at 23:27 +0200, Wolodja Wentland wrote: Hi all, I observed that if I define a relation (foo_query) as lazy='dynamic' and access all referenced entities with foo_query.all() that the query will be executed every time i access it. That is not a big surprise

[sqlalchemy] Dynamic loader versus lazy=True

2009-09-10 Thread Wolodja Wentland
, lazy='dynamic') }) Which one is faster? Does it make a difference, given the optimisation/cache in the database? Will it just mean more bloat in the mapper definition? thanks Wolodja Wentland signature.asc Description: Digital signature

[sqlalchemy] Re: Automatic Polymorphic Identity Assignment

2009-09-09 Thread Wolodja Wentland
Wolodja Wentland signature.asc Description: Digital signature

[sqlalchemy] Drop and recreate primary key indexes

2009-09-08 Thread Wolodja Wentland
way to do so, or do i have to define the index by myself? with kind regards Wolodja Wentland signature.asc Description: Digital signature

[sqlalchemy] Re: Drop and recreate primary key indexes

2009-09-08 Thread Wolodja Wentland
On Tue, Sep 08, 2009 at 13:06 +0200, Wolodja Wentland wrote: is it possible to drop primary key indexes from within SA? I already found the table.indexes set, but it does not contain the primary key index. I can therefore drop all indexes for a table except the primary key one. I did some

[sqlalchemy] Re: Drop and recreate primary key indexes

2009-09-08 Thread Wolodja Wentland
? Is this advisable? Is there a better way to achieve this? with kind regards and thanks for this great tool! Wolodja Wentland signature.asc Description: Digital signature

[sqlalchemy] Re: Drop and recreate primary key indexes

2009-09-08 Thread Wolodja Wentland
On Tue, Sep 08, 2009 at 17:35 -0400, Michael Bayer wrote: Wolodja Wentland wrote: I can't drop these constraints as well. Even if i accept that my tables are created with primary key definitions the recipe you showed me does not work. It fails with: --- snip --- ... /sqlalchemy

[sqlalchemy] Re: Tutorial program 'selectdemo.py'

2009-09-08 Thread Wolodja Wentland
', 'Susan']). ^ ^ in_() takes a *list* not a number of arguments. with kind regards Wolodja Wentland signature.asc Description: Digital signature