Re: Proposal for psql wildcarding behavior w/schemas

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for psql wildcarding behavior w/schemas
Date: 2002-08-06 05:36:51
Message-ID: Pine.LNX.4.44.0208060128400.4408-100000@cm-lcon1-46-187.cm.vtr.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane dijo:

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-06 05:42:32 Re: Proposal for psql wildcarding behavior w/schemas
Previous Message Bruce Momjian 2002-08-06 05:35:33 Re: Please, apply patch for ltree