  	pFIELD <- mallocBytes (#const sizeof(FIELD))	
  	res <- sqlAllocStmt hDBC ((#ptr FIELD, hSTMT) pFIELD)
  	unless (sqlSuccess res) (free pFIELD)
-@@ -258,10 +266,7 @@
+@@ -267,10 +270,7 @@
  	let handleResult res = do
  		unless (sqlSuccess res) (free pFIELD)
  		handleSqlResult (#const SQL_HANDLE_STMT) hSTMT res

+	  let (sqlType,_) = mkSqlType (fromIntegral t) (fromIntegral size) (fromIntegral prec)
+	      nullable = n /= (#const SQL_NO_NULLS)
+	  return (name, sqlType, nullable)
Index: PostgreSQL/HSQL.hsc
===================================================================
RCS file: /cvsroot/htoolkit/HSQL/PostgreSQL/HSQL.hsc,v
retrieving revision 1.10
diff -u -u -r1.10 HSQL.hsc
--- PostgreSQL/HSQL.hsc	27 Sep 2003 09:49:19 -0000	1.10
+++ PostgreSQL/HSQL.hsc	4 Jan 2004 03:14:14 -0000
@@ -140,7 +140,14 @@
    | SqlFetchNull
 		{ seFieldName :: String
 		}
-   deriving (Show, Typeable)
+   deriving (Show)
+
+sqlErrorTc :: TyCon
+sqlErrorTc = mkTyCon "Database.PostgreSQL.HSQL.SqlError"
+
+instance Typeable SqlError where
+	typeOf _ = mkAppTy sqlErrorTc []
+
 
 -----------------------------------------------------------------------------------------
 -- routines for handling exceptions

 	sqlNumResultCols hSTMT ((#ptr FIELD, fieldsCount) pFIELD) >>= handleResult
 	count <- (#peek FIELD, fieldsCount) pFIELD
 	(fields, bufSize) <- getFieldDefs hSTMT pFIELD 1 count
@@ -295,25 +295,32 @@
 				(fields, fullBufSize) <- getFieldDefs hSTMT pFIELD (n+1) count
 				return ((name,sqlType,toBool nullable):fields, max bufSize fullBufSize)
 				
