[Pkg-postgresql-public] postgresql-9.1

Yavuz Selim Komur komur at bilkent.edu.tr
Thu Sep 12 16:01:44 UTC 2013


On Thursday, September 12, 2013 09:32:20 Christoph Berg wrote:
> Re: Yavuz Selim Komur 2013-09-11 <8162822.MWtHOkuTHE at anakin>
> 
> > > Do you have a short test program that shows where py-postgresql is
> > > incompatible with PostgreSQL 9.3?
> > 
> > ---------------  traceback --- ------------
> > 
> >     sess_info['channel'] = postgresql.open(self.uri)
> >   
> >   File "/usr/lib/python3/dist-packages/postgresql/__init__.py", line 88,
> >   in
> 
> I asked for a program, not the traceback.
> 
> Christoph

$ psql -h localhost python python
Password for user python: 
psql (9.3.0)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

python=> \q

-------------------   DB OK..
======================
$ cat db-test.py 

import postgresql

testdb = postgresql.open('pq://python:python@localhost/python')

==================== 

$ python3.3 db-test.py 
Traceback (most recent call last):
  File "db-test.py", line 4, in <module>
    testdb = postgresql.open('pq://python:python@localhost/python')
  File "/usr/lib/python3/dist-packages/postgresql/__init__.py", line 88, in 
open
    c.connect()
  File "/usr/lib/python3/dist-packages/postgresql/driver/pq3.py", line 2559, 
in connect
    sd = self.sys.startup_data()
  File "/usr/lib/python3/dist-packages/postgresql/lib/__init__.py", line 398, 
in __getattr__
    bs = BoundSymbol(sym, db)
  File "/usr/lib/python3/dist-packages/postgresql/lib/__init__.py", line 288, 
in __init__
    ps = database.prepare(symbol)
  File "/usr/lib/python3/dist-packages/postgresql/driver/pq3.py", line 2352, 
in prepare
    ps._fini()
  File "/usr/lib/python3/dist-packages/postgresql/driver/pq3.py", line 1460, 
in _fini
    self.database._pq_complete()
  File "/usr/lib/python3/dist-packages/postgresql/driver/pq3.py", line 2599, 
in _pq_complete
    self.typio.raise_error(x.error_message, cause = getattr(x, 'exception', 
None))
  File "/usr/lib/python3/dist-packages/postgresql/driver/pq3.py", line 507, in 
raise_error
    self.raise_server_error(error_message, **kw)
  File "/usr/lib/python3/dist-packages/postgresql/driver/pq3.py", line 498, in 
raise_server_error
    raise server_error
postgresql.exceptions.UndefinedColumnError: column "procpid" does not exist
  CODE: 42703
  LOCATION: File 'parse_relation.c', line 2628, in errorMissingColumn from 
SERVER
  POSITION: 147
STATEMENT: [parsing]
  LINE:
    FROM pg_catalog.pg_stat_activity WHERE procpid = 
pg_catalog.pg_backend_pid()
                                           ^ [line 6, character 40]
  statement_id: py:0x7f2aecf46210
  string:
    SYMBOL: startup_data
      source:
        SELECT
         pg_catalog.version()::text AS version,
         backend_start::text,
         client_addr::text,
         client_port::int
        FROM pg_catalog.pg_stat_activity WHERE procpid = 
pg_catalog.pg_backend_pid()
        UNION ALL SELECT
         pg_catalog.version()::text AS version,
         NULL::text AS backend_start,
         NULL::text AS client_addr,
         NULL::int AS client_port
        LIMIT 1;
    LIBRARY: /usr/share/python3-postgresql/libsys.sql
CONNECTION: [idle]
CONNECTOR: [Host] pq://python:***@localhost:5432/python
  category: None
DRIVER: postgresql.driver.pq3.Driver




More information about the Pkg-postgresql-public mailing list