Обсуждение: Re: pltcl regress test?
JanWieck@t-online.de (Jan Wieck) writes:
> [ pltcl's regress test is failing ]
> Seems to suffer due to some bug. The functions use a feature
> of the Tcl interpreter, who treates a backslash followed by a
> newline as a whitespace that doesn't start a new command
> (previous command is continued).
> I did some other tests and ISTM that it is totally impossible
> by now to insert data where backslash is followed by newline
> at all. At least I wasn't able to quote it properly. Maybe
> these are filtered already by psql?
Yes, it seems that psql's handling of backslashes has changed for the
worse.
In current sources, I type:
regression=# select 'abc \\
regression'# def';?column?
-----------abc
def
(1 row)
Running with -d2, the postmaster log shows:
DEBUG: StartTransactionCommand
DEBUG: query: select 'abc
def';
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
psql has eaten the backslashes, even though they are within quotes.
This is not cool. 6.5.* psql did not do that, and current sources
don't either *unless* the backslashes are at the very end of a line.
regards, tom lane
Tom Lane wrote: > JanWieck@t-online.de (Jan Wieck) writes: > > [ pltcl's regress test is failing ] > > Seems to suffer due to some bug. The functions use a feature > > of the Tcl interpreter, who treates a backslash followed by a > > newline as a whitespace that doesn't start a new command > > (previous command is continued). > > > I did some other tests and ISTM that it is totally impossible > > by now to insert data where backslash is followed by newline > > at all. At least I wasn't able to quote it properly. Maybe > > these are filtered already by psql? > > Yes, it seems that psql's handling of backslashes has changed for the > worse. After Peter's fix to psql I updated the pltcl test expected result and removed an ordering problem from the test queries. Should work again now. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #