Is tab whitespace?

Поиск
Список
Период
Сортировка
Искать

Is tab whitespace?

От:
ellen@wordbot.com
Дата:
I was surprised to find that the tab character seems not to be treated
as whitespace by psql (7.1).  Is this a bug or a feature?  Specifically,
the following command fails if there is a tab (\t) between "bar" and "init":t:"

ezmlm=> create table foo (bar	int);
ERROR:  parser: parse error at or near ";"

It succeeds if there is a space instead of a tab:

ezmlm=> create table foo (bar int);
CREATE

Ellen Spertus

Re: Is tab whitespace?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
ellen@wordbot.com writes:
> I was surprised to find that the tab character seems not to be treated
> as whitespace by psql (7.1).

The backend thinks a tab is whitespace, but psql doesn't necessarily.
Disable readline (psql -n) if you don't want tab to mean
command-completion.

			regards, tom lane
FAQ