I have tried:

dba = DAL('postgres://postgres:test@localhost/test')

dba.define_table('js', Field('x', 'json'))


The postgres version is 9.3.5 and I have checked that supports_json is True
in try_json in dal.py.

I have read
https://groups.google.com/forum/#!topic/web2py/lYZ-et59-o0
and according to this thread json should work. But it does not, I got:

    Traceback (most recent call last):
  File "D:\web2py\applications\secure\controllers/appadmin.py", line 269,
in select
    *fields, limitby=(start, stop))
  File "D:\web2py\gluon\dal.py", line 10757, in select
    return adapter.select(self.query, fields, attributes)
  File "D:\web2py\gluon\dal.py", line 1881, in select
    return self._select_aux(sql, fields, attributes)
  File "D:\web2py\gluon\dal.py", line 1846, in _select_aux
    self.execute(sql)
  File "D:\web2py\gluon\dal.py", line 1967, in execute
    return self.log_execute(*a, **b)
  File "D:\web2py\gluon\dal.py", line 1961, in log_execute
    ret = self.cursor.execute(command, *a[1:], **b)
  File "D:\web2py\gluon\contrib\pg8000\dbapi.py", line 246, in _fn
    return fn(self, *args, **kwargs)
  File "D:\web2py\gluon\contrib\pg8000\dbapi.py", line 317, in execute
    self._execute(operation, args)
  File "D:\web2py\gluon\contrib\pg8000\dbapi.py", line 322, in _execute
    self.cursor.execute(new_query, *new_args)
  File "D:\web2py\gluon\contrib\pg8000\interface.py", line 399, in execute
    self._stmt.execute(*args, **kwargs)
  File "D:\web2py\gluon\contrib\pg8000\interface.py", line 169, in execute
    self._row_desc, cmd = self.c.bind(self._portal_name,
self._statement_name, args, self._parse_row_desc, kwargs.get("stream"))
  File "D:\web2py\gluon\contrib\pg8000\protocol.py", line 943, in _fn
    return fn(self, *args, **kwargs)
  File "D:\web2py\gluon\contrib\pg8000\protocol.py", line 1117, in bind
    output_fc = [types.py_type_info(f) for f in row_desc.fields]
  File "D:\web2py\gluon\contrib\pg8000\types.py", line 162, in py_type_info
    raise NotSupportedError("type oid %r not mapped to py type" % type_oid)
*NotSupportedError: type oid 114 not mapped to py type*

Any ideas?


​Regards, Martin​

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to