If you do something like this:
(postmodern::query '(:select 1))
The value (:SELECT 1) is not of type STRING. [Condition of type TYPE-ERROR]
Restarts: 0: [ABORT] Return to SLIME's top level. 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {AF37921}>) 0
the slime-repl buffer starts waiting for something (probably some response from the database). When you hit C-c, and select abort, it stops. Afterwards, however, the database connection is lost:
(postmodern::query (:select 1))
Database error: Connection to database server lost. [Condition of type DATABASE-CONNECTION-LOST]
Restarts: 0: [RECONNECT] Try to reconnect. 1: [ABORT] Return to SLIME's top level. 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {AF37921}>)
The problem lies probably somewhere deeper than in query. If I have some time, I'll try to investigate it.
Cheers,
-- Richard
Ryszard,
Thanks for the report. That is rather clumsy indeed -- what happens is that the libary sends the start of a message to the server, and then raises an error when it tries to send the list as a string. After such an error, it will try to re-synchronize the connection, so that it can be used again without reconnecting, but a half-sent message puts the connection in such a broken state that it can not be re-synchronized -- hence the hanging you saw, the server wasn't responding anymore.
I pushed a simple patch that uses check-type to make sure queries (and query names) passed to the cl-postgres functions are string values.
Cheers, Marijn
postmodern-devel@common-lisp.net