Has anybody selectively used SELECT INTO with zope/postgres? Zope version: Zope 2.1.6 (binary release, python 1.5.2, linux2-x86) Python version: 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3] System Platform: linux2 ZPyGreSQLDA-0-0-3 I'm trying something like: SELECT DISTINCT song, ipadress, date INTO TEMP d_requests FROM requests WHERE date > <dtml-sqlvar startdate type="string"> <dtml-var sql_delimiter> SELECT COUNT(*) AS num_requests, song FROM d_requests GROUP BY song --------- works fine under psql zope raises an exceptions.ValueError and the db connection dies. traceback follows: <!-- Traceback (innermost last): File /path/to/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /path/to/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /path/to/zope/lib/python/Zope/__init__.py, line 180, in zpublisher_exception_hook (Object: copy_of_getTopRequests) File /path/to/zope/lib/python/ZODB/Transaction.py, line 180, in begin File /path/to/zope/lib/python/ZODB/Transaction.py, line 155, in abort File /path/to/zope/lib/python/Shared/DC/ZRDB/THUNK.py, line 115, in abort File /path/to/zope/lib/python/Products/ZPyGreSQLDA/db.py, line 117, in _abort ValueError: PQsendQuery() -- There is no connection to the backend. -->
Has anybody selectively used SELECT INTO with zope/postgres?
Make that succesfully.
Zope version: Zope 2.1.6 (binary release, python 1.5.2, linux2-x86) Python version: 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3] System Platform: linux2 ZPyGreSQLDA-0-0-3
I'm trying something like:
SELECT DISTINCT song, ipadress, date INTO TEMP d_requests FROM requests WHERE date > <dtml-sqlvar startdate type="string"> <dtml-var sql_delimiter> SELECT COUNT(*) AS num_requests, song FROM d_requests GROUP BY song
--------- works fine under psql zope raises an exceptions.ValueError and the db connection dies.
traceback follows: <!-- Traceback (innermost last): File /path/to/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /path/to/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /path/to/zope/lib/python/Zope/__init__.py, line 180, in zpublisher_exception_hook (Object: copy_of_getTopRequests) File /path/to/zope/lib/python/ZODB/Transaction.py, line 180, in begin File /path/to/zope/lib/python/ZODB/Transaction.py, line 155, in abort File /path/to/zope/lib/python/Shared/DC/ZRDB/THUNK.py, line 115, in abort File /path/to/zope/lib/python/Products/ZPyGreSQLDA/db.py, line 117, in _abort ValueError: PQsendQuery() -- There is no connection to the backend.
-->
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
+-------[ Steve Drees ]---------------------- | Has anybody selectively used SELECT INTO with zope/postgres? It's probably dying because there can only be ONE SELECT clause in a ZSQL Method. The SELECT ... INTO will be triggering a false positive. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
participants (2)
-
Andrew Kenneth Milton -
Steve Drees