Re: Fwd: polite request about syntax
| От | Andrew Dunstan |
|---|---|
| Тема | Re: Fwd: polite request about syntax |
| Дата | |
| Msg-id | 450AD7F1.1010806@dunslane.net обсуждение исходный текст |
| Ответ на | Fwd: polite request about syntax ("Ricardo Malafaia" <rmalafaia@gmail.com>) |
| Список | pgsql-hackers |
Ricardo Malafaia wrote:
>
> And the $$ is indeed needed for allowing languages with different
> syntaxes. agreed. However, Tom, i could counter example your plperl
> example:
>
>> realize that qq/end/ does not represent a matching "end"?
>
> What happens then when it sees something like a double variable
> interpolation as in $$foobar? ;)
>
The delimiter does not have to be $$. It can be
$any_unquoted_identifier_without_a_dollar_sign$.
the lexer says:
/* $foo$ style quotes ("dollar quoting")* The quoted string starts with $foo$ where "foo" is an optional string* in the
formof an identifier, except that it may not contain "$",* and extends to the first occurrence of an identical string.
*There is *no* processing of the quoted text.**/
dolq_start [A-Za-z\200-\377_]
dolq_cont [A-Za-z\200-\377_0-9]
dolqdelim \$({dolq_start}{dolq_cont}*)?\$
So for a plperl function you just use something like $func$ at each end.
cheers
andrew
В списке pgsql-hackers по дате отправления: