Re: Bug in parser?
Stephan Szabo <sszabo@megazone23.bigpanda.com>
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Gerhard Dieringer <Gerhard.Dieringer@arcor.de>
Cc: Postgres Bugs <pgsql-bugs@postgresql.org>
Date: 2003-06-01T15:05:36Z
Lists: pgsql-bugs
On 31 May 2003, Gerhard Dieringer wrote: > > > ============================================================================ > POSTGRESQL BUG REPORT TEMPLATE > ============================================================================ > > > Your name : Gerhard Dieringer > Your email address : Gerhard.Dieringer@nexgo.de > > > System Configuration > --------------------- > Architecture (example: Intel Pentium) :Dual Intel Pentium II > > Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.16 > > PostgreSQL version (example: PostgreSQL-7.3.3): PostgreSQL-7.3.3 > > Compiler used (example: gcc 2.95.2) : gcc-Version 3.3 > > > Please enter a FULL description of your problem: > ------------------------------------------------ > Inconsistent results when calling '+' operator with text arguemts > The last 4 results (f.e. '1' + '2' -> 'c') are very strange. '1'+'2' is pretty meaningless. In the other cases you're giving a type that has a meaningful + operator so it's trying to convert the quoted argument to an appropriate type for +. In the '1'+'2' case it's converting to "char" (single character) and adding those which seems marginally reasonable to me (although I think that "char" is pretty silly). I'm not sure what you expected '1'+'2' to give though, concatenation is || and I can't think of something meaningful to do with it.