Implement PGSQL-CONN-OPEN?.
authorChris Hanson <org/chris-hanson/cph>
Tue, 11 Nov 2003 04:46:43 +0000 (04:46 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 11 Nov 2003 04:46:43 +0000 (04:46 +0000)
v7/src/runtime/pgsql.scm
v7/src/runtime/runtime.pkg

index 2f13e3a33571d985e3c40973be92900bd62cc6d9..e6297c9a83e5eb17d75d84a384629c91d1ed0f1f 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: pgsql.scm,v 1.7 2003/11/10 21:46:20 cph Exp $
+$Id: pgsql.scm,v 1.8 2003/11/11 04:46:39 cph Exp $
 
 Copyright 2003 Massachusetts Institute of Technology
 
@@ -240,6 +240,10 @@ USA.
                    (set! conn)
                    unspecific))))
 
+(define (pgsql-conn-open? connection)
+  (guarantee-connection connection 'PGSQL-CONN-OPEN?)
+  (if (connection-handle connection) #t #f))
+
 (define-integrable (connection->handle connection)
   (guarantee-valid-connection connection 'CONNECTION->HANDLE))
 
index 1b0a4500b805b1224c59c8273123ecbbc37b6b67..0e2e30162f111a4ceec4ec3a6eecda6a0ba60c51 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.468 2003/11/06 04:16:50 cph Exp $
+$Id: runtime.pkg,v 14.469 2003/11/11 04:46:43 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -4660,6 +4660,7 @@ USA.
          pgsql-conn-db
          pgsql-conn-error-message
          pgsql-conn-host
+         pgsql-conn-open?
          pgsql-conn-options
          pgsql-conn-pass
          pgsql-conn-port