diff --git a/info.c b/info.c
index 76bcedd..1b87665 100644
--- a/info.c
+++ b/info.c
@@ -5106,7 +5106,8 @@ mylog("atttypid=%s\n", atttypid ? atttypid : "(null)");
 					switch (*proargmodes)
 					{
 						case 'o':
-							ptype = SQL_PARAM_OUTPUT;
+						case 't':
+							ptype = bRetset ? SQL_RESULT_COL : SQL_PARAM_OUTPUT;
 							break;
 						case 'b':
 							ptype = SQL_PARAM_INPUT_OUTPUT;
@@ -5138,20 +5139,12 @@ mylog("atttypid=%s\n", atttypid ? atttypid : "(null)");
 			}
 		}
 		/* RESULT Columns info */
-		if (NULL != atttypid || bRetset)
+		if (NULL != atttypid && !bRetset)
 		{
 			int	typid;
 
-			if (bRetset)
-			{
-				typid = pgtype;
-				attname = NULL;
-			}
-			else
-			{
-				typid = atoi(atttypid);
-				attname = QR_get_value_backend_text(tres, i, attname_pos);
-			}
+			typid = atoi(atttypid);
+			attname = QR_get_value_backend_text(tres, i, attname_pos);
 			tuple = QR_AddNew(res);
 			set_tuplefield_string(&tuple[PROCOLS_PROCEDURE_CAT], CurrCat(conn));
 			set_nullfield_string(&tuple[PROCOLS_PROCEDURE_SCHEM], schema_name);
