On 24.04.2010 15:53, Dirk F. Raetzel wrote:
Try to add schema prefix in all db_table_* and db_sequence_* options.
This is not working, as it won't change the search path for pgsql.
If you for example do
INSERT INTO myschema.users ...
then implicitly sequence user_ids will be searched to generate a new user_id, but pgsql will not find it, as it only looks in the default search_path (usually 'public'). RC is not explicitly referencing the sequence.
This is working for me, and this definetly should work if you create tables using sequence names with schema name (in CREATE TABLE).
psql (8.4.3)
testdb=# CREATE SEQUENCE test.test_id; CREATE SEQUENCE testdb=# CREATE TABLE test.test (id integer default nextval('test.test_id'), t text); CREATE TABLE testdb=# INSERT INTO test.test (t) VALUES('a'); INSERT 0 1 testdb=# SELECT * FROM test.test; id | t ----+--- 1 | a (1 row)
ps. next thing I'll work on will be replace of all db_table_*/db_sequence_* options with one db_prefix option.