[sqlalchemy] Re: Error with autoload=True and ForeignKey for postgresql

2007-07-19 Thread jdu
ah, ok...are you saying you changed your own search_path ? Yes, ive changed my search_path so that my 'runtime' user (different than user 'jdu') don't need the schema prefix in request (schema 'jdu' was prepend in the search_path). I removed this change to default the search_path and it worked

[sqlalchemy] Error with autoload=True and ForeignKey for postgresql

2007-07-18 Thread jdu
sqlalchemy import * metadata = MetaData(postgres://jdu:[EMAIL PROTECTED]:5432/test, echo=True) schema = jdu subject = Table(subject, metadata, Column(id, Integer, primary_key=True), schema=schema) referer = Table(referer, metadata, Column(id, Integer

[sqlalchemy] Re: Error with autoload=True and ForeignKey for postgresql

2007-07-18 Thread jdu
:42,466 INFO sqlalchemy.engine.base.Engine.0x..ec {'name': 'subject', 'schema': 'jdu'} 2007-07-18 20:18:42,503 INFO sqlalchemy.engine.base.Engine.0x..ec select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=%(schema)s and lower(relname)=% (name)s 2007-07-18 20:18

[sqlalchemy] Re: Error with autoload=True and ForeignKey for postgresql

2007-07-18 Thread jdu
After changing something, it's working for me too now. The request used for postgresql autoload is: SELECT conname, pg_catalog.pg_get_constraintdef(oid, true) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = 30554 AND r.contype = 'f' ORDER BY 1 ... and the result depends on the

[sqlalchemy] Re: Error with autoload=True and ForeignKey for postgresql

2007-07-18 Thread jdu
I have the same error with your advice (ForeignKey(jdu.subject.id)). The output has been uploaded as the file log.txt (copy/paste seems not working). Hope it helps you. jp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: column_prefix with synonym

2007-06-28 Thread jdu
juin, 22:47, Michael Bayer [EMAIL PROTECTED] wrote: On Jun 27, 2007, at 3:48 PM, jdu wrote: It seems that both options don't work in common: dates = Table('dates', meta, Column('date', Date, primary_key=True) ) mapper(MyDate, dates, column_prefix='_', properties=dict( date

[sqlalchemy] column_prefix with synonym

2007-06-27 Thread jdu
It seems that both options don't work in common: dates = Table('dates', meta, Column('date', Date, primary_key=True) ) mapper(MyDate, dates, column_prefix='_', properties=dict( date = synonym('_date'), ) produces with 0.3.8: ArgumentError: WARNING: column 'date' not being added due to