[sqlalchemy] Re: SA 0.3.4 and sequence for non-primary key column

2007-02-04 Thread che
thanks again, Michael. Stefan --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: SA 0.3.4 and sequence for non-primary key column

2007-02-02 Thread Michael Bayer
thats a bug, i fixed it in r2291. if you dont want to use the trunk for now, you can probably define the column as: Column('obj_id', integer, default=func.obj_id_seq.nextval()) On Feb 2, 2007, at 4:05 AM, che wrote: Hi, I have a table with column that must use sequence generated number

[sqlalchemy] Re: SA 0.3.4 and sequence for non-primary key column

2007-02-02 Thread che
Hi, Michael Bayer написа: if you dont want to use the trunk for now, you can probably define the column as: Column('obj_id', integer, default=func.obj_id_seq.nextval()) this answers another question of mine :) that i planned to ask ...but it generates (on Postgres) this: SELECT

[sqlalchemy] Re: SA 0.3.4 and sequence for non-primary key column

2007-02-02 Thread Michael Bayer
oh right...try func.nextval('obj_id_seq') On Feb 2, 2007, at 12:46 PM, che wrote: Hi, Michael Bayer написа: if you dont want to use the trunk for now, you can probably define the column as: Column('obj_id', integer, default=func.obj_id_seq.nextval()) this answers another question of