On 12/4/06, Clayton Scott <[EMAIL PROTECTED]> wrote:
> On 12/4/06, John Siracusa <[EMAIL PROTECTED]> wrote:
>> Perhaps Rose::DB::Oracle could have a hard-coded default bit of
>> post_connect_sql to set nls_date_format, but I'd prefer it if I could
>> handle whatever Oracle produces if you do not set nls_date_format
>> explicitly.  Or is there no default and it must always be set
>> explicitly?  (I've never really used Oracle, obviously...)
>
> There is a default (in the english world) of DD-MON-YY (23-JAN-00)

Ick!  A two-digit year?  What are the rules for parsing that?

> but the DBA may change it on you, that's why it's safer to reset it for
> each session to enforce your expectations

Well, if possible, I'd like to handle that DD-MON-YY idiocy by
default, and then just put a note in the documentation about
explicitly setting nls_date_format in post_connect_sql in your data
source if you want something different.  That seems like the least
invasive solution.

> Another method would be to setup some metadata on
> Rose::DB::Object::Metadata::Column::Datetime to a strptime
> pattern to be used to parse the datetime format?

No other database requires that, and I'd rather not do it unless it
adds some sort of useful flexibility.  When would you want two
different columns to have different formats?  Would that even be
possible, let alone useful?  It seems to me that setting
nls_date_format "globally" at the data source level is all that'll
ever be needed.

-John

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to