Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y0gjp-0002l7-Uv for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Dec 2014 01:15:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y0gjp-0002Pn-7F for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Dec 2014 01:15:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y0gjo-0002Pf-D4 for pgsql-bugs@postgresql.org; Tue, 16 Dec 2014 01:15:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y0gjl-0005aS-6i for pgsql-bugs@postgresql.org; Tue, 16 Dec 2014 01:15:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sBG1FcEm006852; Mon, 15 Dec 2014 20:15:38 -0500 From: Tom Lane To: omkar1103@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12242: No error - if there is no comma seperator In-reply-to: <20141215162555.2699.79394@wrigleys.postgresql.org> References: <20141215162555.2699.79394@wrigleys.postgresql.org> Comments: In-reply-to omkar1103@gmail.com message dated "Mon, 15 Dec 2014 16:25:55 +0000" Date: Mon, 15 Dec 2014 20:15:38 -0500 Message-ID: <6851.1418692538@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 omkar1103@gmail.com writes: > Below script does not throw error > ======================================= > SELECT > claim_status, > claim_key > FROM tbl_claim > WHERE claim_key IN > ( > '1140799265' > '2129945595' > ) > Throws Error > ======================================= > SELECT > claim_status, > claim_key > FROM tbl_claim > WHERE claim_key IN > ( > '1140799265' '2129945595' > ) Yup. This is not only not a bug, it's behavior required by the SQL standard. Literal strings are concatenated automatically as long as they're separated by a newline. This is mentioned in the PG docs under 4.1.2.1. String Constants: http://www.postgresql.org/docs/9.3/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS (This is one of many decisions I'm sure the SQL committee would like to have back, but we're pretty much stuck with it now.) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs