Tom Lane dijo:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Uh, if we follow the shell rules, quote-star-quote means star has no
> > special meaning:
>
> Interesting analogy. We can't take it too far, because the shell quote
> rules don't agree with SQL:
[...]
> $ echo "foo\bar"
> foar <--- \b went to backspace
>
> So backslash isn't special within quotes according to SQL, but it
> is according to the shell.
Note that GNU echo has actually two different behaviours:
$ echo "a\bb"
a\bb
$ echo -e "a\bb"
b
Also note that since the backslash is between quotes you are not actually
testing shell behaviour but echo(1) behaviour. bash(1) and tcsh(1) both
say
$ echo a\bb
abb
The shell will interpret anything that is outside quotes and leave
anything inside quotes alone, but of course you already knew that. It's
echo that's interpreting further the backslashed string. In that light,
I'd say * should be left alone (no special behaviour) if between quotes.
My 10 chilean pesos.
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Porque Kim no hacia nada, pero, eso si,
con extraordinario exito" ("Kim", Kipling)