Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcqj0-0007kE-0a for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Aug 2016 09:13:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bcqiy-0004B5-Lf for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Aug 2016 09:13:24 +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_2) (envelope-from ) id 1bcqix-0004Ap-On for pgsql-hackers@postgresql.org; Thu, 25 Aug 2016 09:13:23 +0000 Received: from nm43.bullet.mail.gq1.yahoo.com ([67.195.87.83]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bcqiq-0003pF-8M for pgsql-hackers@postgresql.org; Thu, 25 Aug 2016 09:13:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s2048; t=1472116392; bh=MKUXji5wYoW7mSFnDOG6ZLhT6Ro6OYmMgovwiwxcqDE=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=FHDVlC5odPMysHA6yZYsrsd+FNhmEpBeOB4OpCZefrlGhZeaqXZl2aTxnsoq6zAvo96PUfgkHbnJ6OYN9IxQWmylmvIMfJm4MDr7UhfMRYPV/EtlxQyHZxIq70tMkOhKJK2S73MAFXqcUBjia35ZIv9uDip2en/ZY6RIJb8Kb3vpkqVFwqujHXyDCHxdLw1RlMr+nQny/EJJS67TOf3JVv2zP1Ir1AraNNRc1DgIgCv7aeqYoKJ8+0aVRFUzMJMGWao5XkXesSgiHDH4R+Z5rk4DtZAAsptkbgyJNfZQo7R5o1Jcd2NVrMRwI1PDyKtgMJHKsUyri1hM79OmAra9vw== Received: from [127.0.0.1] by nm43.bullet.mail.gq1.yahoo.com with NNFMP; 25 Aug 2016 09:13:12 -0000 Received: from [98.137.12.61] by nm43.bullet.mail.gq1.yahoo.com with NNFMP; 25 Aug 2016 09:10:31 -0000 Received: from [106.10.166.119] by tm6.bullet.mail.gq1.yahoo.com with NNFMP; 25 Aug 2016 09:10:31 -0000 Received: from [106.10.151.123] by tm8.bullet.mail.sg3.yahoo.com with NNFMP; 25 Aug 2016 09:10:31 -0000 Received: from [127.0.0.1] by omp1005.mail.sg3.yahoo.com with NNFMP; 25 Aug 2016 09:10:30 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 994253.91715.bm@omp1005.mail.sg3.yahoo.com X-YMail-OSG: aJjdweUVRDvKI06o4VoIKSyEtcC1BXYcrI9Q.ABrMHqz Received: from jws10953.mail.sg3.yahoo.com by sendmailws108.mail.sg3.yahoo.com; Thu, 25 Aug 2016 09:10:30 +0000; 1472116230.604 Date: Thu, 25 Aug 2016 09:10:29 +0000 (UTC) From: amul sul Reply-To: amul sul To: Artur Zakirov , Robert Haas Cc: Pavel Stehule , Tom Lane , "David G. Johnston" , Alex Ignatov , Bruce Momjian , PostgreSQL-development Message-ID: <1054231194.17565594.1472116229825.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <22dbe4e0-b550-ca86-8634-adcda0faa159@postgrespro.ru> References: <1873520224.1784572.1465833145330.JavaMail.yahoo.ref@mail.yahoo.com> <31915.1466703655@sss.pgh.pa.us> <32684.1466704957@sss.pgh.pa.us> <734e50cd-c563-4afd-d1c8-80f244b3265e@postgrespro.ru> <1285870380.13225431.1471272994354.JavaMail.yahoo@mail.yahoo.com> <60cc3122-0950-e455-21fe-de89882e285d@postgrespro.ru> <2095510729.14135736.1471444528728.JavaMail.yahoo@mail.yahoo.com> <03e76bef-75eb-4d70-40d6-890d42f4dc8e@postgrespro.ru> <22dbe4e0-b550-ca86-8634-adcda0faa159@postgrespro.ru> Subject: Re: Bug in to_timestamp(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Length: 957 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Thursday, August 25, 2016 1:56 PM, Artur Zakirov wrote: >> #2. Warning at compilation; >> >> formatting.c: In function =E2=80=98do_to_timestamp=E2=80=99: >> formatting.c:3049:37: warning: =E2=80=98prev_type=E2=80=99 may be used u= ninitialized in this function [-Wmaybe-uninitialized] >> if (prev_type =3D=3D NODE_TYPE_SPACE || prev_type =3D=3D NODE_TYPE_SEPAR= ATOR) >> ^ >> formatting.c:2988:5: note: =E2=80=98prev_type=E2=80=99 was declared here >> prev_type; >> ^ >> >> You can avoid this by assigning zero (or introduce NODE_TYPE_INVAL ) to= prev_type at following line: >> >> 256 + prev_type; > > >You are right. I assigned to prev_type NODE_TYPE_SPACE to be able to=20 >execute such query: > > >SELECT to_timestamp('---2000----JUN', 'YYYY MON'); > > >Will be it a proper behaviour? Looks good to me, no one will complain if something working on PG but not o= n Oracle.=20 Thanks & Regards, Amul Sul --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers