Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#4348 closed defect (fixed)

[PATCH] OGR SQL 'SUBSTR' is not conformant with other SQL implementations

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: 1.8.0
Severity: normal Keywords: ogr sql
Cc:

Description (last modified by Even Rouault)

Our implementation considers that the character offset is like C language, that is to say that the first character is offset 0, the second one is offset 1, etc... All other implementations I've found consider 1 as the first character, 2 as the second one (and as a special case, if 0 is provided, they turn it to 1...)

References:

Should we fix our implementation ? (SUBSTR has been introduced in GDAL 1.8.0 and is not yet advertized in ogr_sql.dox)

Attachments (1)

ticket_4348.patch (1.9 KB ) - added by Even Rouault 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Even Rouault, 12 years ago

Summary: OGR SQL 'SUBSTR' is not conformant with other SQL implementations[PATCH] OGR SQL 'SUBSTR' is not conformant with other SQL implementations

by Even Rouault, 12 years ago

Attachment: ticket_4348.patch added

comment:2 by Even Rouault, 12 years ago

Description: modified (diff)

comment:3 by Even Rouault, 12 years ago

Milestone: 1.8.2
Resolution: fixed
Status: newclosed

r23434 /trunk/ (3 files in 2 dirs): [backward-compatibility] OGR SQL: fix offset convertion for SUBSTR() (#4348)

r23435 /branches/1.8/ (3 files in 2 dirs): [backward-compatibility] OGR SQL: fix offset convertion for SUBSTR() (#4348)

comment:4 by Even Rouault, 11 years ago

Milestone: 1.8.2

Milestone 1.8.2 deleted

Note: See TracTickets for help on using tickets.