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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: Regress tests reveal *serious* psql bug
Date: 2000-01-11 17:20:11
Message-ID: 200001111720.MAA18286@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-01-11 17:47:52 AW: [HACKERS] Enhancing PGSQL to be compatible with Informix SQL
Previous Message Tom Lane 2000-01-11 16:57:47 Re: Regress tests reveal *serious* psql bug