Re: Proposal for psql wildcarding behavior w/schemas

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Proposal for psql wildcarding behavior w/schemas
Дата
Msg-id Pine.LNX.4.44.0208060128400.4408-100000@cm-lcon1-46-187.cm.vtr.net
обсуждение исходный текст
Ответ на Re: Proposal for psql wildcarding behavior w/schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Proposal for psql wildcarding behavior w/schemas
Список pgsql-hackers
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)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Please, apply patch for ltree
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proposal for psql wildcarding behavior w/schemas