When web2py tries to create the table user I'm getting the following
error message:
ERROR: syntax error at or near "user"
LINE 1: CREATE TABLE user(
^
********** Erro **********
ERROR: syntax error at or near "user"
SQL state: 42601
Caracter: 14
Thanks
Tito
--
Linux User #387870
____
_/_õ|__|
º[ .-.___.-._| . . . .
_(o).__(o).:_____
We/you may have to rewrite 'user' into 'cas_user' or something else
everywhere, unless there is a way to tell postgres to allow 'user'.
Sorry about this.
Massimo
I have changed in model/db.py and controller/cas.py. There are other
files that need to change?
Tito
Massimo
Traceback (most recent call last):
File "/srv/web2py/gluon/restricted.py", line 62, in restricted
exec ccode in environment
File "/srv/web2py/applications/suporte/controllers/cas.py", line
182, in <module>
File "/srv/web2py/applications/suporte/controllers/cas.py", line 59, in login
insert_ticket(session)
File "/srv/web2py/applications/suporte/controllers/cas.py", line 36,
in insert_ticket
url=session.service,ctime=now)
File "/srv/web2py/gluon/sql.py", line 579, in insert
query=self._insert(**fields)
File "/srv/web2py/gluon/sql.py", line 555, in _insert
raise SyntaxError, 'invalid field name'
SyntaxError: invalid field name
--
Traceback (most recent call last):
File "/srv/web2py/gluon/restricted.py", line 62, in restricted
exec ccode in environment
File "/srv/web2py/applications/suporte/controllers/cas.py", line
182, in <module>
File "/srv/web2py/applications/suporte/controllers/cas.py", line 95,
in register
if form.accepts(request.vars,session) and \
File "/srv/web2py/gluon/html.py", line 132, in accepts
self.rec_accepts(vars)
File "/srv/web2py/gluon/html.py", line 137, in rec_accepts
if hasattr(c,'rec_accepts'): c.rec_accepts(vars)
File "/srv/web2py/gluon/html.py", line 137, in rec_accepts
if hasattr(c,'rec_accepts'): c.rec_accepts(vars)
File "/srv/web2py/gluon/html.py", line 137, in rec_accepts
if hasattr(c,'rec_accepts'): c.rec_accepts(vars)
File "/srv/web2py/gluon/html.py", line 137, in rec_accepts
if hasattr(c,'rec_accepts'): c.rec_accepts(vars)
File "/srv/web2py/gluon/html.py", line 371, in rec_accepts
value,errors=validator(value)
File "/srv/web2py/gluon/validators.py", line 143, in __call__
fetched=self.dbset("%s=%s AND %s<>%s" %
(fieldname,value_field,id_field,value_id)).select('count(*)')
File "/srv/web2py/gluon/sql.py", line 844, in select
r=response(query)
File "/srv/web2py/gluon/sql.py", line 840, in response
self._db._execute(query)
File "/srv/web2py/gluon/sql.py", line 322, in <lambda>
self._execute=lambda *a,**b: self._cursor.execute(*a,**b)
ProgrammingError: rro de sintaxe em ou próximo a "."
LINE 1: SELECT count(*) FROM user WHERE user.email='tito...'
On Fri, Jun 13, 2008 at 12:36 PM, Massimo Di Pierro
there are user.mail entries... change to cas_user.mail
Since you are using this. Do you want to take over the maintenance of
CAS?
I will be happy if other people want to take over the maintenance of
various web2py apps (except KPAX since I am working on it right now).
Massimo
On Mon, Jun 16, 2008 at 8:41 PM, Massimo Di Pierro
>
> Sure... I'll try to make some improvements ;)
> I has some problems with the size of the field in postgres, error when
> I tried to login.
> I've changed the length of the ticket fields. What length would be
> a good value?
I do not recall but this is fixed by the key length. 64 to be safe.
Perhaps the key should just be a uuid.uuid4()