cube bug accepting -.1

Started by Bruno Wolff IIIover 23 years ago4 messagesbugs
Jump to latest
#1Bruno Wolff III
bruno@wolff.to

The lex scanner for the cube package has an apparent error in its
pattern for matching floating point numbers. It doesn't except cases
where there is no digit between a sign and a decimal point. For example
-.1 is not matched by the pattern.

I have attached a patch to cubeparse.l and the regression differences.

P.S. I still plan to submit enhancement patches for cube before the
end of the week, but as this is a bug fix I thought it should really
go in separately.

Attachments:

regression.diffstext/plain; charset=us-asciiDownload+5-5
cube.difftext/plain; charset=us-asciiDownload+2-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruno Wolff III (#1)
Re: cube bug accepting -.1

Bruno Wolff III <bruno@wolff.to> writes:

The lex scanner for the cube package has an apparent error in its
pattern for matching floating point numbers. It doesn't except cases
where there is no digit between a sign and a decimal point. For example
-.1 is not matched by the pattern.

I think you got the patch reversed? But it looks reasonable when read
the right way round ...

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Bruno Wolff III (#1)
Re: cube bug accepting -.1

Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Bruno Wolff III wrote:

The lex scanner for the cube package has an apparent error in its
pattern for matching floating point numbers. It doesn't except cases
where there is no digit between a sign and a decimal point. For example
-.1 is not matched by the pattern.

I have attached a patch to cubeparse.l and the regression differences.

P.S. I still plan to submit enhancement patches for cube before the
end of the week, but as this is a bug fix I thought it should really
go in separately.

[ Attachment, skipping... ]

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Bruce Momjian
bruce@momjian.us
In reply to: Bruno Wolff III (#1)
Re: cube bug accepting -.1

Patch withdrawn by author.

---------------------------------------------------------------------------

Bruno Wolff III wrote:

The lex scanner for the cube package has an apparent error in its
pattern for matching floating point numbers. It doesn't except cases
where there is no digit between a sign and a decimal point. For example
-.1 is not matched by the pattern.

I have attached a patch to cubeparse.l and the regression differences.

P.S. I still plan to submit enhancement patches for cube before the
end of the week, but as this is a bug fix I thought it should really
go in separately.

[ Attachment, skipping... ]

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073