was the table created by web2py ? On Thursday, June 26, 2014 9:53:31 AM UTC+2, at wrote: > > Hello, > > I am getting getting this: > > <class 'psycopg2.OperationalError'>(lastval is not yet defined in this > session ) > while running: > if db(db.user_role).isempty(): > db.user_role.insert(id=1, title='Application Administrator') > db.user_role.insert(id=2, title='Account Administrator') > db.user_role.insert(id=3, title='Account Member') > > whereas my table defination is simply as follows: > db.define_table('user_role', > Field('title', type='string', length=50, label=T('User Role Title')) > ) > > and in postgres: > CREATE TABLE user_role > ( > id serial NOT NULL, > title character varying(50), > CONSTRAINT user_role_pkey PRIMARY KEY (id ) > ) > WITH ( > OIDS=FALSE > ); > > Any help please ... > > Thanks & Regards > AT > >
-- 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/d/optout.