From 10b7442b9b7b9f990972d7349352edeb2e392777 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 7 Nov 2003 20:07:47 +0000 Subject: [PATCH] Change PGSQL-GET-VALUE to return #F if field is NULL. --- v7/src/runtime/pgsql.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)) -- 2.25.1