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)
but the DBA may change it on you, that's why it's safer to reset it for
each session to enforce your expectations or you run into bugs like
this one:
http://www.togaware.com/linux/survivor/NLS_DATE.html

It's much safer to alter nls_date_format explicitly, since a Rose::DB::Objects
user that specifies a datetime column wants to reliably get the DateTime
object back and this is the most robust approach to achieving DWIM.

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?


More oracle goodies here:
http://philip.greenspun.com/sql/


-- 
Clayton Scott
[EMAIL PROTECTED]

-------------------------------------------------------------------------
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