Re: [HACKERS] Re: Regress tests reveal *serious* psql bug

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Re: Regress tests reveal *serious* psql bug
Дата
Msg-id 200001111720.MAA18286@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Regress tests reveal *serious* psql bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Re: Regress tests reveal *serious* psql bug  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
> The reason *why* it is doing this is that it thinks that ":3" and so
> forth are variables that it ought to substitute for, and since it has
> no definition for them, it happily substitutes empty strings.
> 
> After fixing the outright bugs, we could make the array test work by
> changing "[1:3]" to "[1\:3]" and so forth, but I think that that is the
> wrong way to deal with it.  I believe that psql's variable feature needs
> to be redefined, instead.

I know this is the only regression problem you found, and I am glad it
is isolated to psql, and a design problem that can be easily addressed. 
I think the requriement that all variables begin with a letter is a good
idea.

We recommended the : in the first place because it is the standard for
embedded SQL variable handling.

I am sure Peter can address this.

> I would also suggest tightening up the allowed names of variables;
> conventional practice is that variable names have to start with a
> letter, and I think psql ought to follow that convention.  (That
> wouldn't in itself stop the array-subscript problem, though, since
> an array subscript could be a simple field reference.)
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Regress tests reveal *serious* psql bug
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL