summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2002-10-17 08:09:31 +0000
committerThies C. Arntzen <thies@php.net>2002-10-17 08:09:31 +0000
commit58d1ee0915666fa3dc452d51671f6287217d8ae6 (patch)
tree6c45b778162943e64a17a12072cd7e6ea7007691
parent8fc45de3deac818eb4aa25ca200efd24cc11c1cb (diff)
downloadphp-git-58d1ee0915666fa3dc452d51671f6287217d8ae6.tar.gz
@- Added Oracle TIMESTAMP type to oci8 extension. (thies)
-rw-r--r--ext/oci8/oci8.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 54deffb198..7cf02845e7 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -1670,7 +1670,14 @@ oci_execute(oci_statement *statement, char *func,ub4 mode)
case SQLT_BIN:
default:
define_type = SQLT_CHR;
- if ((outcol->data_type == SQLT_DAT) || (outcol->data_type == SQLT_NUM)) {
+ if ((outcol->data_type == SQLT_DAT) || (outcol->data_type == SQLT_NUM)
+#ifdef SQLT_TIMESTAMP
+ || (outcol->data_type == SQLT_TIMESTAMP)
+#endif
+#ifdef SQLT_TIMESTAMP_TZ
+ || (outcol->data_type == SQLT_TIMESTAMP_TZ)
+#endif
+ ) {
outcol->storage_size4 = 512; /* XXX this should fit "most" NLS date-formats and Numbers */
} else {
outcol->storage_size4++; /* add one for string terminator */
@@ -3735,6 +3742,16 @@ PHP_FUNCTION(ocicolumntype)
RETURN_FALSE;
}
switch (outcol->data_type) {
+#ifdef SQLT_TIMESTAMP
+ case SQLT_TIMESTAMP:
+ RETVAL_STRING("TIMESTAMP",1);
+ break;
+#endif
+#ifdef SQLT_TIMESTAMP_TZ
+ case SQLT_TIMESTAMP_TZ:
+ RETVAL_STRING("TIMESTAMP_TZ",1);
+ break;
+#endif
case SQLT_DAT:
RETVAL_STRING("DATE",1);
break;