From: | Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk> |
---|---|
To: | maillist(at)candle(dot)pha(dot)pa(dot)us, peter_e(at)gmx(dot)net |
Cc: | hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] New psql input mode problems |
Date: | 1999-11-08 18:01:45 |
Message-ID: | 199911081801.SAA22673@mtcc.demon.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
>On Sun, 7 Nov 1999, Bruce Momjian wrote:
>
>> > This seems to be where it goes wrong. (mainloop.c)
>> >
>> > /* No more input. Time to quit, or \i done */
>> > if (line == NULL || (!pset->cur_cmd_interactive && *line == '\0'))
>
>This line was there in the old source as well.
Just checked and you're right..
>
>> >
>> > When a blank line is encountered in the input
>> >
>> > line = gets_fromFile(source);
>> >
>> > returns an empty string ('\0') and terminates the processing.
>
>Same in the old one.
I think somehow the old version was subtly different.
The old version of psql read and processed the whole of
each regression sql file. The new version stops processing
as soon as it sees a blank line.
I'm not sure if there's something different with the '\n'
handling in the new version. If the '\n' is being stripped
out that could make all the difference between "\n", which
would not terminate and "" which would.
>
>> >
>> > with the if clause reduced to checking for line == NULL psql
>> > does the work but fails badly due to the differences between
>> > results and expected. (comments, QUERY:, echo processing)
>
>As I said, that part was not my idea. I'll look into that though.
This is a difficult one, I never was any good at decisions.
There are a number of key differences.
Query text OLD echoed prefixed with "QUERY:" NEW echoed as read.
Formatting OLD slightly different to NEW. (alignment and '-'s)
OLD:
QUERY: SELECT 1 AS one;
one
---
1
(1 row)
NEW:
SELECT 1 AS one;
one
-----
1
(1 row)
>
>>
>> >
>> > Is the intention to modify expected to agree with the new
>> > results output, or fix psql to output in the expected format?
>
>How about using the old psql for regression testing?
I like the new one better :-)
>
>>
>> Good question. We need to know if people like the current output
>> format, or the old one better?
>
>I send in several examples. If no one comments, that's silent approval.
>I am really hesitant to put in a compatibility format, but I might just do
>that until new regression tests are out and you ask me to.
>
If it was not too difficult this would be one way to go.
We really need the regression output maintainer (Tom?) to comment
here. I'd hate to have to do the 1st compare between the new output
and old expected by eye.
Keith.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-11-08 20:41:13 | Re: [HACKERS] new Psql \pset border |
Previous Message | Bruce Momjian | 1999-11-08 15:56:48 | Re: [HACKERS] new Psql \pset border |