Subject Re: [Firebird-Architect] Literal strings and quotes
Author Alexander peshkoff
On Wednesday 20 May 2009 11:33:39 Martijn Tonies wrote:
> >> Oracle has a feature where you can use quotes inside strings without
> >> need to double them.
> >>
> >> Here is a example:
> >> select q'!where name = 'xyz'!' from dual;
> >> Result: where name = 'xyz'
> >>
> >> And another one:
> >> select q'{where name = 'xyz'}' from dual;
> >> Result: where name = 'xyz'
> >>
> >> When the opening character is "[", "{", "(" or "<", the closing one is
> >> respectively "]", "}", ")" and ">". In other cases, the opening and
> >> closing shall be identical.
> >>
> >> The strings really terminates in <close char><quote>, so you can even
> >> use that character inside it.
> >>
> >> I propose the same thing for Firebird.
> >
> > Does it mean that in the old program literal '{ABC}' will actually
> > become 'ABC'?
>
> No, you have to prefix the string with a q
>
> q'{ABC}'
>
> Now it uses { as the quote char inside the string so you can safely
> use ' inside the {..}.

In that case I see no problems with this feature in FB3.