Re: (Fwd) Re: Any Oracle 9 users? A test please... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: (Fwd) Re: Any Oracle 9 users? A test please...
Date
Msg-id 12303.1033425628@sss.pgh.pa.us
Whole thread Raw
In response to Re: (Fwd) Re: Any Oracle 9 users? A test please...  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I don't see how we can be compliant if SQL92 says:
>     The time of evaluation of the <datetime value function> during the
>     execution of the SQL-statement is implementation-dependent.
> It says it has to be "during the SQL statement", or is SQL statement
> also ambiguous?  Is that why Oracle did what they did?

Yes, you're finally seeing my issue: "SQL statement" isn't all that
well-defined a concept.

ISTM that the reported behavior of Oracle's pl/sql is *clearly* in
violation of SQL92: the body of a pl/sql function is a single <SQL
procedure statement> per SQL92 4.17, so how can they allow
current_timestamp to change within it?

It would be even more interesting to try the same function called
from another pl/sql function --- in that scenario, hardly anyone
could deny that the whole execution of the inner function is contained
within one statement of the outer function, and therefore
current_timestamp should not be changing within it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql likes Tuesday...
Next
From: Hannu Krosing
Date:
Subject: Re: Postgresql likes Tuesday...