Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtkKK-0007D0-Au for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2015 22:45:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtkKJ-0003Ok-Pg for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2015 22:45:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZthkX-0005X1-Qy for pgsql-bugs@postgresql.org; Tue, 03 Nov 2015 20:00:09 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZthkR-0005vr-6t for pgsql-bugs@postgresql.org; Tue, 03 Nov 2015 20:00:09 +0000 MIME-Version: 1.0 Subject: BUG #13754: Postgres possibly accepts a typo as valid input To: pgsql-bugs@postgresql.org From: ryan.vilim@gmail.com Date: Tue, 03 Nov 2015 19:59:49 +0000 Message-ID: <20151103195949.2747.55003@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13754 Logged by: Ryan Vilim Email address: ryan.vilim@gmail.com PostgreSQL version: 9.4.1 Operating system: Mac Description: I recently found that postgres will accept the SELECT -144mycol to be equivalent to SELECT -144 AS mycol. As long as the first bits work out to be numbers it accepts it. For example, it will also interpret SELECT FLOOR(-144.4)*4mycol as SELECT FLOOR(144.4)*4 as mycol I haven't been able to find any other references to this being standard SQL. I think it might be a bug in postgres. Ryan -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs