Ticket #4348 (closed defect: fixed)

Opened 18 months ago

Last modified 3 weeks ago

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

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

Description (last modified by rouault) (diff)

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

ticket_4348.patch Download (1.9 KB) - added by rouault 18 months ago.

Change History

Changed 18 months ago by rouault

  • summary changed from OGR SQL 'SUBSTR' is not conformant with other SQL implementations to [PATCH] OGR SQL 'SUBSTR' is not conformant with other SQL implementations

Changed 18 months ago by rouault

Changed 18 months ago by rouault

  • description modified (diff)

Changed 18 months ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 1.8.2

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)

Changed 3 weeks ago by rouault

  • milestone 1.8.2 deleted

Milestone 1.8.2 deleted

Note: See TracTickets for help on using tickets.