From: Chris Hanson Date: Fri, 7 Nov 2003 20:07:47 +0000 (+0000) Subject: Change PGSQL-GET-VALUE to return #F if field is NULL. X-Git-Tag: 20090517-FFI~1761 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=10b7442b9b7b9f990972d7349352edeb2e392777;p=mit-scheme.git Change PGSQL-GET-VALUE to return #F if field is NULL. --- diff --git a/v7/src/runtime/pgsql.scm b/v7/src/runtime/pgsql.scm index 82cdbaa99..a53b0246f 100644 --- a/v7/src/runtime/pgsql.scm +++ b/v7/src/runtime/pgsql.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: pgsql.scm,v 1.4 2003/11/06 04:16:46 cph Exp $ +$Id: pgsql.scm,v 1.5 2003/11/07 20:07:47 cph Exp $ Copyright 2003 Massachusetts Institute of Technology @@ -335,7 +335,10 @@ USA. (pq-field-name (result->handle result) index)) (define (pgsql-get-value result row column) - (pq-get-value (result->handle result) row column)) + (let ((handle (result->handle result))) + (if (pq-get-is-null? handle row column) + #f + (pq-get-value handle row column)))) (define (pgsql-get-is-null? result row column) (pq-get-is-null? (result->handle result) row column))