Re: (Fwd) Re: Any Oracle 9 users? A test please...

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Dan Langille <dan(at)langille(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: (Fwd) Re: Any Oracle 9 users? A test please...
Date: 2002-09-30 19:29:07
Message-ID: 3D98A603.5070300@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> It is not clear to me; is this its own transaction or a function call?
>

That looks like an anonymous PL/SQL procedure to me. Another
question might be, given:

"more than one reference to one or more <datetime value
function>s, then all such references are effectively evaluated
simultaneously"

under what conditions does Oracle report *the same* value for
CURRENT_TIMESTAMP? So far, in this discussion, we have the
following scenarios:

1. RDBMS start: No one
2. Session start: No one
3. Transaction start: PostgreSQL
4. Statement start: ???
5. CURRENT_TIMESTAMP evaluation: Oracle 9, ???

Given what Tom has posted regarding the standard, I think Oracle
is wrong. I'm wondering how the others handle multiple
references in CURRENT_TIMESTAMP in a single stored
procedure/function invocation. It seems to me that the lower
bound is #4, not #5, and the upper bound is implementation
dependent. Therefore PostgreSQL is in compliance, but its
compliance is not very popular.

Mike Mascari
mascarm(at)mascari(dot)com

> Dan Langille wrote:
>>
>>
>>DECLARE
>> time1 TIMESTAMP;
>> time2 TIMESTAMP;
>> sleeptime NUMBER;
>>BEGIN
>> sleeptime := 5;
>> SELECT CURRENT_TIMESTAMP INTO time1 FROM DUAL;
>> DBMS_LOCK.SLEEP(sleeptime);
>> SELECT CURRENT_TIMESTAMP INTO time2 FROM DUAL;
>> DBMS_OUTPUT.PUT_LINE(TO_CHAR(time1));
>> DBMS_OUTPUT.PUT_LINE(TO_CHAR(time2));
>>END;
>>/
>>30-SEP-02 11.54.09.583576 AM
>>30-SEP-02 11.54.14.708333 AM
>>
>>PL/SQL procedure successfully completed.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-09-30 20:07:24 Re: Do we want a CVS branch now?
Previous Message Bruce Momjian 2002-09-30 19:07:27 Re: (Fwd) Re: Any Oracle 9 users? A test please...