Tom Lane wrote:
> and unless I'm mistaken, our behavior conforms to the spec and Oracle's
> doesn't.
>
> Strictly speaking, the spec doesn't define the behavior of "SUBSTR" at
> all, only "SUBSTRING" with this weird FROM/FOR argument syntax. But
> PG treats SUBSTR(x,y,z), SUBSTRING(x,y,z) and SUBSTRING(x FROM y FOR z)
> all the same. Possibly Oracle conforms to spec for SUBSTRING but
> their SUBSTR acts differently?
Thanks, Tom, I agree that PG's substr() appears to be following the spec
(thank goodness I don't have to read that whole thing ;). Oracle does
not implement substring() at all (up through release 9.2, the latest I
have to work with. Just checked the online documentation for 10g
Release 2 (latest available) and it doesn't have it either. Says this
under conformance: "E021-06, SUBSTRING function: use SUBSTR function
instead". Sigh...
--
Guy Rouillier