From: Adam B. <ad...@po...> - 2003-05-28 22:31:40
|
On Wed, May 28, 2003 at 02:18:42PM +0200, Gerhard H=E4ring wrote: > >>The pyPgSQL source distribution includes examples for notifications=20 > >>(examples/demo2a.py, examples/demo2b.py). > >>Please report back if you still have problems. [...] > They did certainly work for me last time I checked. >=20 > Do you have different versions of the PostgreSQL client library and the= =20 > server? If for example you use a 7.3 client and a 7.2 server there migh= t=20 > be some problems ... Just a rough guess of me of course. I quickly checked my installation of PostgreSQL + pyPgSQL and NOTIFY messages do not work either. I have Python 2.2.2, PostgreSQL 7.3.2 and pyPgSQL 2.3, everything compiled and installed from sources. The problem is that although NOTIFY messages are sent to the client, thay are not correctly decoded by pyPgSQL library. The result of running demo2a and demo2b is: Waiting..... ASYNC NOTICE of 'P*' from backend pid 1066 recieved Waiting..... ASYNC NOTICE of '*' from backend pid 1066 recieved Waiting........... ASYNC NOTICE of 'P*' from backend pid 1066 recieved The string 'P*' or '*' is random and each run of demo programs shows something different here. Sometimes these characters are even non-ASCII. Everything works under plain psql, however: when I run demo2b, psql prints: Asynchronous NOTIFY 'demo2a' from backend with pid 1089 received. Asynchronous NOTIFY 'demo2a' from backend with pid 1089 received. Asynchronous NOTIFY 'demo2a' from backend with pid 1089 received. Regards, --=20 Adam Buraczewski <ad...@po...> * Linux registered user #165585 GCS/TW d- s-:+>+:- a- C+++(++++) UL++++$ P++ L++++ E++ W+ N++ o? K? w-- O M- V- PS+ !PE Y PGP+ t+ 5 X+ R tv- b+ DI? D G++ e+++>++++ h r+>++ y? |