aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java13
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java11
2 files changed, 15 insertions, 9 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java
index 73b5b11367b..91317bae4ea 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java
@@ -136,9 +136,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
}
/**
- * Can you put a NULL in this column? I think this is always
- * true in 6.1's case. It would only be false if the field had
- * been defined NOT NULL (system catalogs could be queried?)
+ * Indicates the nullability of values in the designated column.
*
* @param column the first column is 1, the second is 2...
* @return one of the columnNullable values
@@ -146,9 +144,14 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
*/
public int isNullable(int column) throws SQLException
{
- return columnNullable; // We can always put NULL in
+ /*
+ * TODO This needs a real implementation, taking into account columns
+ * defined with NOT NULL or PRIMARY KEY, CHECK constraints, views,
+ * functions etc.
+ */
+ return columnNullableUnknown;
}
-
+
/**
* Is the column a signed number? In PostgreSQL, all numbers
* are signed, so this is trivial. However, strings are not
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java
index e09b872f496..49ba9c72ed9 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java
@@ -131,9 +131,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
}
/**
- * Can you put a NULL in this column? I think this is always
- * true in 6.1's case. It would only be false if the field had
- * been defined NOT NULL (system catalogs could be queried?)
+ * Indicates the nullability of values in the designated column.
*
* @param column the first column is 1, the second is 2...
* @return one of the columnNullable values
@@ -141,7 +139,12 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
*/
public int isNullable(int column) throws SQLException
{
- return columnNullable; // We can always put NULL in
+ /*
+ * TODO This needs a real implementation, taking into account columns
+ * defined with NOT NULL or PRIMARY KEY, CHECK constraints, views,
+ * functions etc.
+ */
+ return columnNullableUnknown;
}
/**