I just joined the group and am assuming this is the correct place to post a
patch. Please excuse my ignorance if I am wrong...
This patch makes DBD::Oracle handle TIMESTAMP WITH TIME ZONE columns.
I will note now that the solution below is NOT ideal (IMHO). I personally
think that DBI needs some new DATE/TIME types that support timezones as well.
Also, is there a reason that the Oracle types TIME, TIME WITH TIME ZONE,
and TIMESTAMP aren't supported?
Thanks,
Rob
P.S. Is there a FAQ for this list?
-------------------------------------------------------
diff -c DBD-Oracle-1.12/Oracle.pm DBD-Oracle-1.12-rew/Oracle.pm
*** DBD-Oracle-1.12/Oracle.pm Fri Aug 31 10:27:17 2001
--- DBD-Oracle-1.12-rew/Oracle.pm Wed Sep 19 16:58:05 2001
***************
*** 489,494 ****
--- 489,497 ----
[ 'DATE', 9, 19, '\'', '\'', undef, 1, '0', 3,
undef, '0', '0', undef, '0', '0', 11, undef, undef
],
+ [ 'TIMESTAMP WITH TIME ZONE', 11, 34, '\'', '\'', undef, 1, '0', 3,
+ undef, '0', '0', undef, '0', '9', 11, undef, undef
+ ],
[ 'VARCHAR2', 12, $varchar2_maxlen, '\'', '\'', 'max length', 1, 1, 3,
undef, '0', '0', undef, undef, undef, 12, undef, undef
]
diff -c DBD-Oracle-1.12/dbdimp.c DBD-Oracle-1.12-rew/dbdimp.c
*** DBD-Oracle-1.12/dbdimp.c Wed Aug 29 13:39:15 2001
--- DBD-Oracle-1.12-rew/dbdimp.c Wed Sep 19 17:00:49 2001
***************
*** 1922,1927 ****
--- 1922,1928 ----
case SQLT_CHR: sql_fbh.dbtype = SQL_VARCHAR; break;
case SQLT_LNG: sql_fbh.dbtype = SQL_LONGVARCHAR; break; /* long */
case SQLT_DAT: sql_fbh.dbtype = SQL_DATE; break;
+ case SQLT_TIMESTAMP_TZ: sql_fbh.dbtype = SQL_TIMESTAMP; break;
case SQLT_BIN: sql_fbh.dbtype = SQL_BINARY; break; /* raw */
case SQLT_LBI: sql_fbh.dbtype = SQL_LONGVARBINARY; break; /* long raw */
case SQLT_AFC: sql_fbh.dbtype = SQL_CHAR; break; /* Ansi fixed
char */
diff -c DBD-Oracle-1.12/oci8.c DBD-Oracle-1.12-rew/oci8.c
*** DBD-Oracle-1.12/oci8.c Fri Aug 31 09:55:05 2001
--- DBD-Oracle-1.12-rew/oci8.c Wed Sep 19 17:43:02 2001
***************
*** 897,902 ****
--- 897,906 ----
avg_width = 4; /* > approx +/- 1_000_000 ? */
break;
+ case 188: /* TIMESTAMP WITH TIME ZONE */
+ /* actually dependent on NLS default date format*/
+ fbh->disize = 75; /* a generous default */
+ break;
case 12: /* DATE */
/* actually dependent on NLS default date format*/
fbh->disize = 75; /* a generous default */