Thread: Is tab whitespace?

Is tab whitespace?

From
ellen@wordbot.com
Date:
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?

From
Tom Lane
Date:
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