Re: [HACKERS] psql and comments

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] psql and comments
Date: 1999-10-07 22:09:43
Message-ID: Pine.LNX.4.10.9910072348440.848-100000@peter-e.yi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 7, Tom Lane mentioned:

> There was talk earlier of changing the behavior so that psql would
> forward comments to the backend, rather than stripping them. One
> potential annoyance if we do that is that (I think) all the regress
> test expected outputs will change because comments will then appear
> in them.

That is a somewhat separate issue, but good that you bring it up. In my
cleaning ways I noticed that the -e vs. -E switches weren't applied
correctly so I set that straight to an extent. The regression tests rely
on -e to echo the query back correctly, not the one actually sent to the
backend, so that could be tweaked.

Luckily, the regression tests don't make extensive use of the backslash
commands, the issue being that their output might change. I only found
three backslash commands in the whole regression tests. One occurence does
something like this:

some query;
*** comment
*** comment
\p
\r
more queries;

which should probably be changed anyway to something like

-- comment
-- comment

The other case is
CREATE TEMP TABLE temptest(col int);
-- test temp table deletion
\c regression
SELECT * FROM temptest;
which still works as I just confirmed, and the output of \c gets eaten in
-q mode anyway.

Seems it's still safe.

--
Peter Eisentraut Sernanders vaeg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-10-07 23:16:58 Re: Top N queries and disbursion
Previous Message Peter Eisentraut 1999-10-07 21:47:43 Re: [HACKERS] psql and comments