That's very kind.
I'm on the trunk (0.4.1dev_r3747) and on linux. And I think your
script (with a changed connection string, nothing else) fails on my
machine. Here's the complete output:
2007-11-07 16:33:14,848 INFO sqlalchemy.engine.base.Engine.0x..b4
select relname from pg_class c join pg_namespace n on
n.oid=c.relnamespace where n.nspname=current_schema() and
lower(relname)=%(name)s
2007-11-07 16:33:14,848 INFO sqlalchemy.engine.base.Engine.0x..b4
{'name': 'referer'}
2007-11-07 16:33:14,940 INFO sqlalchemy.engine.base.Engine.0x..b4
select relname from pg_class c join pg_namespace n on
n.oid=c.relnamespace where n.nspname=current_schema() and
lower(relname)=%(name)s
2007-11-07 16:33:14,940 INFO sqlalchemy.engine.base.Engine.0x..b4
{'name': 'test'}
2007-11-07 16:33:14,941 INFO sqlalchemy.engine.base.Engine.0x..b4
DROP TABLE referer
2007-11-07 16:33:14,941 INFO sqlalchemy.engine.base.Engine.0x..b4 {}
2007-11-07 16:33:15,304 INFO sqlalchemy.engine.base.Engine.0x..b4
COMMIT
2007-11-07 16:33:15,397 INFO sqlalchemy.engine.base.Engine.0x..b4
DROP TABLE test
2007-11-07 16:33:15,397 INFO sqlalchemy.engine.base.Engine.0x..b4 {}
2007-11-07 16:33:15,430 INFO sqlalchemy.engine.base.Engine.0x..b4
COMMIT
2007-11-07 16:33:15,439 INFO sqlalchemy.engine.base.Engine.0x..b4
select relname from pg_class c join pg_namespace n on
n.oid=c.relnamespace where n.nspname=current_schema() and
lower(relname)=%(name)s
2007-11-07 16:33:15,439 INFO sqlalchemy.engine.base.Engine.0x..b4
{'name': 'test'}
2007-11-07 16:33:15,440 INFO sqlalchemy.engine.base.Engine.0x..b4
select relname from pg_class c join pg_namespace n on
n.oid=c.relnamespace where n.nspname=current_schema() and
lower(relname)=%(name)s
2007-11-07 16:33:15,440 INFO sqlalchemy.engine.base.Engine.0x..b4
{'name': 'referer'}
2007-11-07 16:33:15,441 INFO sqlalchemy.engine.base.Engine.0x..b4
CREATE TABLE test (
id SERIAL NOT NULL,
data TEXT,
PRIMARY KEY (id)
)
2007-11-07 16:33:15,442 INFO sqlalchemy.engine.base.Engine.0x..b4 {}
2007-11-07 16:33:15,893 INFO sqlalchemy.engine.base.Engine.0x..b4
COMMIT
2007-11-07 16:33:15,894 INFO sqlalchemy.engine.base.Engine.0x..b4
CREATE TABLE referer (
id SERIAL NOT NULL,
fk INTEGER,
PRIMARY KEY (id),
FOREIGN KEY(fk) REFERENCES test (id)
)
2007-11-07 16:33:15,894 INFO sqlalchemy.engine.base.Engine.0x..b4 {}
2007-11-07 16:33:15,958 INFO sqlalchemy.engine.base.Engine.0x..b4
COMMIT
2007-11-07 16:33:15,963 INFO sqlalchemy.engine.base.Engine.0x..b4
INSERT INTO test (data) VALUES (%(data)s)
2007-11-07 16:33:15,963 INFO sqlalchemy.engine.base.Engine.0x..b4
[{'data': 1}, {'data': 2}, {'data': 3}, {'data': 4}, {'data': 5},
{'data': 6}, {'data': 7}, {'data': 8}, {'data': 9}, {'data': 10},
{'data': 11}, {'data': 12}, {'data': 13}, {'data': 14}, {'data': 15},
{'data': 30}, {'data': 44}, {'data': 55}]
2007-11-07 16:33:15,968 INFO sqlalchemy.engine.base.Engine.0x..b4
COMMIT
2007-11-07 16:33:15,969 INFO sqlalchemy.engine.base.Engine.0x..b4
select nextval('"referer_id_seq"')
2007-11-07 16:33:15,969 INFO sqlalchemy.engine.base.Engine.0x..b4 None
2007-11-07 16:33:15,970 INFO sqlalchemy.engine.base.Engine.0x..b4
INSERT INTO referer (id, fk) VALUES (%(id)s, %(fk)s)
2007-11-07 16:33:15,970 INFO sqlalchemy.engine.base.Engine.0x..b4
{'fk': 2, 'id': 1L}
2007-11-07 16:33:15,971 INFO sqlalchemy.engine.base.Engine.0x..b4
COMMIT
2007-11-07 16:33:15,976 INFO sqlalchemy.engine.base.Engine.0x..b4
SELECT "testView".id AS "testView_id", "testView".data AS
"testView_data"
FROM (SELECT test.id AS id, test.data AS data
FROM test
WHERE test.id IN (%(test_id)s, %(test_id_1)s, %(test_id_2)s, %
(test_id_3)s, %(test_id_4)s, %(test_id_5)s, %(test_id_6)s, %
(test_id_7)s, %(test_id_8)s, %(test_id_9)s, %(test_id_10)s)) AS
"testView"
WHERE "testView".id = %(param_1)s ORDER BY "testView".id
2007-11-07 16:33:15,976 INFO sqlalchemy.engine.base.Engine.0x..b4
{'test_id_3': 5, 'test_id_10': 45, 'param_1': None, 'test_id_8': 30,
'test_id_9': 44, 'test_id_1': 3, 'test_id_2': 4, 'test_id': 2,
'test_id_4': 8, 'test_id_5': 10, 'test_id_6': 11, 'test_id_7': 13}
None
2007-11-07 16:33:15,979 INFO sqlalchemy.engine.base.Engine.0x..b4
SELECT referer.id AS referer_id, referer.fk AS referer_fk
FROM referer
WHERE referer.id = %(param_1)s ORDER BY referer.id
2007-11-07 16:33:15,979 INFO sqlalchemy.engine.base.Engine.0x..b4
{'param_1': 1}
22007-11-07 16:33:15,982 INFO sqlalchemy.engine.base.Engine.0x..b4
SELECT "testView".id AS "testView_id", "testView".data AS
"testView_data"
FROM (SELECT test.id AS id, test.data AS data
FROM test
WHERE test.id IN (%(test_id)s, %(test_id_1)s, %(test_id_2)s, %
(test_id_3)s, %(test_id_4)s, %(test_id_5)s, %(test_id_6)s, %
(test_id_7)s, %(test_id_8)s, %(test_id_9)s, %(test_id_10)s)) AS
"testView"
WHERE "testView".id = %(param_1)s ORDER BY "testView".id
2007-11-07 16:33:15,982 INFO sqlalchemy.engine.base.Engine.0x..b4
{'test_id_3': 5, 'test_id_10': 45, 'param_1': None, 'test_id_8': 30,
'test_id_9': 44, 'test_id_1': 3, 'test_id_2': 4, 'test_id': 2,
'test_id_4': 8, 'test_id_5': 10, 'test_id_6': 11, 'test_id_7': 13}
None
What I checked today is that Python (2.5.1 versus the installed 2.4.1)
plus the latest psycopg2 does not make a difference.
Best regards
Klaus
On 7 Nov., 16:24, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Nov 7, 2007, at 6:01 AM, klaus wrote:
>
>
>
> > This is strange. I had problems reproducing the bug for a long time
> > and was now quite happy that I succeeded.
>
> > Yes, I'm using PostgreSQL 8.1.5 and psycopg2. And I still see the
> > behavior that I reported. That should narrow the problem down to
> > something in my local setup... I'm sorry for wasting your time.
>
> are you on release 0.4.0 ? attached is the full script i was using, i
> moved the tables around so that I could use drop_all()/create_all().
> Additionally, I just remembered that there are often dictionary-
> ordering related issues which will occur on linux but not OSX (which
> is my normal platform). So I'll try on linux later today...or if
> anyone else wants to run the attached script with PG, SA0.4 and a
> linux machine that would be helpful.
>
> test.py
> 1KHerunterladen
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---