[sqlalchemy] Moving from Mysql to postgresql and Case Insensitive querys

2012-01-18 Thread Martijn Moeling
Hi, I am use to setup the collation in MySQL to ci_utf8 (Case Insensitive) I would like the same behaviour on PostgreSQL. I use Unicode (Or UnicodeText) as columntype If I leave the Collation empty it defaults to C which means it looks at bytecodes so it will NOT be case insensitive.

[sqlalchemy] column_property and relationship

2012-01-18 Thread Ronan Dunklau
Hello. I'm having trouble mapping a relationship on a column_property. A similar problem has been reported in an old post on this mailing list, but with no answers: http://groups.google.com/group/sqlalchemy/browse_thread/thread/f7a13d9ca1494060/6fe890bb49c8dfa8#6fe890bb49c8dfa8 I have a column

Re: [sqlalchemy] bug in DDL event with %

2012-01-18 Thread Michael Bayer
you have to escape those out with %%. On Jan 18, 2012, at 3:06 AM, lestat wrote: Hi! If I create DDL like this with %: event.listen(db.metadata, 'after_create', DDL( CREATE OR REPLACE FUNCTION test_func() RETURNS void AS $$ DECLARE max_user_id INTEGER; BEGIN

Re: [sqlalchemy] column_property and relationship

2012-01-18 Thread Michael Bayer
On Jan 18, 2012, at 8:44 AM, Ronan Dunklau wrote: Hello. I'm having trouble mapping a relationship on a column_property. A similar problem has been reported in an old post on this mailing list, but with no answers:

[sqlalchemy] joined table inheritance

2012-01-18 Thread Thierry
Hi I'm trying to mimick the example from the documentation (employee/ manager/engineer) I've been able to add employees, and engineers, and all works as expected now my next step would be, creating an 'Employee' object, and some time later, decide that he's in fact an engineer. so my first

Re: [sqlalchemy] joined table inheritance

2012-01-18 Thread Martijn Moeling
That is not going to work. let me explain: Polymorphic inheritance uses tables and discriminators and some logic somewhere in the system. (As far as I can tell both SA and databases can do the job, i have to look into that) For each object there will be a table, including the base object.

[sqlalchemy] PG Sequence on non primary_key column and ForeignKey

2012-01-18 Thread Martijn Moeling
I managed to get PG (9.0) installed and I am in the process over moving over from MySQL, I allready have stuff working and am now trying to get the main reason for the Quick move: Sequence. I have a object like: seq=Sequence('serialnumber', metadata=Base.metadata) Class Object1(Base):

Re: [sqlalchemy] PG Sequence on non primary_key column and ForeignKey

2012-01-18 Thread Conor
On 01/18/2012 02:14 PM, Martijn Moeling wrote: I managed to get PG (9.0) installed and I am in the process over moving over from MySQL, I allready have stuff working and am now trying to get the main reason for the Quick move: Sequence. I have a object like: seq=Sequence('serialnumber',

Re: Re: [sqlalchemy] joined table inheritance

2012-01-18 Thread Martijn Moeling
You are welcome, I get a lot of help from here, taking some load of Michael's back is the least I can do. I got the idea from your story that you needed to understand how the mechanics are. I'm blessed in having very complex polymorphic self relating setups with lots of mixins and Object

Re: [sqlalchemy] PG Sequence on non primary_key column and ForeignKey

2012-01-18 Thread Martijn Moeling
That is what I thought, I removed it after it did give the same error, to be sure, I just tested that again. I also must say it might be something else I might need an relation since many Objects can reference a single SerialNumber Not sure what to do relation ('….…?? I have to think