dbTalk Databases Forums  

Re: TIMESTAMP in Object Type Bug

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Re: TIMESTAMP in Object Type Bug in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Vladimir M. Zakharychev
 
Posts: n/a

Default Re: TIMESTAMP in Object Type Bug - 09-13-2006 , 01:08 PM







Björn Wächter wrote:
Quote:
Hello,

I have a problem with a timestamp with timezone in an object type.
What I do is. Create a type like this:

CREATE OR REPLACE
TYPE OBJ_TIMESTAMP AS OBJECT (
TEST_TS TIMESTAMP(3) WITH LOCAL TIME ZONE
);

Create a function returning such an object:

CREATE OR REPLACE FUNCTION OBJ_CURRENT_TIME
RETURN OBJ_TIMESTAMP
IS
v_return OBJ_TIMESTAMP;
BEGIN

v_return := OBJ_TIMESTAMP(CURRENT_TIMESTAMP);

RETURN v_return;

END OBJ_CURRENT_TIME;


If my session timezone is:

SELECT sessiontimezone FROM DUAL;

SESSIONTIMEZONE
---------------
+02:00

Everything works just fine like expected:

SELECT OBJ_CURRENT_TIME().TEST_TS from dual;

OBJ_CURRENT_TIME().TEST_TS
-------------------------------
13-SEP-06 01.53.30.693845 PM


But if a change to CET:

ALTER SESSION SET TIME_ZONE = 'CET';

SELECT sessiontimezone FROM DUAL;

SESSIONTIMEZONE
----------------
CET

and execute the same again:

SELECT OBJ_CURRENT_TIME().TEST_TS from dual;

OBJ_CURRENT_TIME().TEST_TS
---------------------------
11--48 05.02.01.086455 PM


I'm facing this problem in 10.1.0.4 and 10.2.0.1

Am I doing something wrong with the object or is
it a bug?



Thanks Björn
Looks like a bug: on my 10.1.0.5 Solaris 64-bit instance I managed to
get ORA-600 with your sample code. While session time zone is not
changed, everything works as expected. Change it to anything, and boom
- I get ORA-600 [kopp2pic661]. The only published note on this
particular OERI doesn't seem to be related as it involves dblinks,
besides it is claimed to be fixed in 10.1.0.5... If you have support
contract, I'd suggest that you open a SR with Oracle Support, or I can
open it with your test case and my trace files, which clearly show this
is erratic server behavior.

Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.