(translated from a message of Martin Miranda to web2py-usuarios)

"... After upgrading to web2py 2.8.2-stable+timestamp.2013.11.28.13.54.07 
my app throws the following error:

<class 'psycopg2.ProgrammingError'>(relation "testSeq_id_seq" does not 
exist LINE 1: select currval('"testSeq_id_seq"') ^ )

I've been using Postgres 9.1. While pgAdmin shows only lower case table 
names, web2py model tables are defined using upper and lower case, for 
example:

WEB2PY: db.define_table('testSeq', Field(...))
pgAdmin: Tables: testseq 
         Sequence: testseq_id_seq

For avoiding the error shown above, an option was to add the argument 
sequence_name="%s_id_seq" % str(table).lower() (for each table defined).

Another option, maybe that could be considered to be added to the dal 
module:

In PostgreSQLAdapter class -> sequence_name method.

def sequence_name(self,table):
        # return '%s_id_seq' % table -> before.
        return '%s_id_seq' % str(table).lower()

So, I hope this is helpfull ..."


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to