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

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, 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-12 08:26:34
Message-ID: 387C3ABA.BC071D19@albourne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I think we can live with requiring a variable name to start with an
> > alphabetic or underscore.
>
> > SELECT a[1:2]
>
> > is clear and
>
> > SELECT a[1:myvar]
>
> > expands to SELECT a[1].
>
> No go --- SELECT a[1:b] where b is a field name is a valid query
> currently.

The colon in array syntax is quite a special case. It should be relatively
easy to figure out whether you are in a construct of the form
[<token>:<token>]. And then there should be no problem in figuring out that
in
[1:b] b refers to a column and in [1::b] ':b' is a variable. Do colons
apear anywhere else?

Btw, i agree that variables should start with a letter and by default
variables have to be declared.

Adriaan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Adriaan Joubert 2000-01-12 08:42:32 Re: [HACKERS] BlowAwayRelationBuffers
Previous Message Tom Lane 2000-01-12 08:24:42 Re: [HACKERS] BlowAwayRelationBuffers