Re: [HACKERS] Numeric with '-' - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Numeric with '-'
Date
Msg-id 22275.951195189@sss.pgh.pa.us
Whole thread Raw
In response to RE: [HACKERS] Numeric with '-'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses RE: [HACKERS] Numeric with '-'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
>> They didn't give any such warning before, either.  I doubt I've
>> made anything worse.

> Before your change
> INSERT into t (numdata) values (-1234567890.1234567);
> caused an error
> ERROR:  Unable to convert left operator '-' from type 'unknown'.
> but currently inserts a constant -1234567890.12346.

Yipes, you are right.  I think that that sort of construct should
result in the value not getting converted at all until the parser
knows that it must be converted to the destination column's type.
Let me see if I can find out what's going wrong.  If this doesn't
seem to be fixable, I may have to back off the patch...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Beta for 4:30AST ... ?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Beta for 4:30AST ... ?