Re: [GENERAL] substr negative indexes

2007-01-15 Thread Guy Rouillier
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 F

Re: [GENERAL] substr negative indexes

2007-01-14 Thread Tom Lane
Guy Rouillier <[EMAIL PROTECTED]> writes: > Does the spec leave implementation of indexes on the substr() function > less than one undefined? SQL99 defines the result of ::= SUBSTRING FROM [ FOR ] as a) Let C be the value of th

[GENERAL] substr negative indexes

2007-01-14 Thread Guy Rouillier
Does the spec leave implementation of indexes on the substr() function less than one undefined? By mistake, I had a substr() invocation with an initial index of zero (would be nice if all the computer languages of the world could agree to a single definition.) Oracle silently treats this the