Delimited SQL Identifiers in Gpre - Functional Specification


This document describes the gpre support for delimited identifiers. Delimited identifiers are among the many new features that InterBase 6.0 supports. Gpre now has to understand the difference between single quoted and double quoted strings and interpret them correctly. User Interface/Usability

In 6.0 Gpre single quoted strings are always strings. However double quoted strings are resolved based on the following table.

Server Version ODS Version Client dialect Resultant
<6.0 <10.0 1 String
    2 Error : Ambiguous use of double quotes
    3 Error : Server does not support
=6.0 =10.0 1 String
    2 Error : Ambiguous use of double quotes
    3 Delimited identifier.

Migration Issues

Usage of double quotes for identifiers allows the user to embed single or double quotes in identifier names. Also one can now use blank spaces in the names. Case sensitivity is another issue. "fieldname" is not same as fieldname. Anything within double quotes preserves its case.

Usage of quotes within an identifier name is handled by inserting escape characters. If double quotes are to be embedded then the way to do it is : "Quoted""Name". Single quotes can be embedded normally as "Quoted'Name". Similarly single quotes in a string is embedded as 'Single''Quoted'.

Hence these are all valid names: simplename, "Quotedname", "QuotedName", "Spaced Name", "Mc""Enna""s Gold" etc.

Older applications which have used both single and double quotes for strings will have to be changed to use single quotes only.