Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WiEWr-0000Cl-CA for pgsql-bugs@arkaria.postgresql.org; Thu, 08 May 2014 02:57:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WiEWq-0004LL-SZ for pgsql-bugs@arkaria.postgresql.org; Thu, 08 May 2014 02:57:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WiEWp-0004LE-RA for pgsql-bugs@postgresql.org; Thu, 08 May 2014 02:57:47 +0000 Received: from mail-yh0-f47.google.com ([209.85.213.47]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WiEWl-0004As-No for pgsql-bugs@postgresql.org; Thu, 08 May 2014 02:57:47 +0000 Received: by mail-yh0-f47.google.com with SMTP id z6so1374794yhz.6 for ; Wed, 07 May 2014 19:57:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Lls6VmuJ+lYQ/oA4gNCLo+fgd+sN2h90oOBCjscRXH0=; b=NRrUBCc9M5CQeTzpqa8gFU2kLnzQxzqOEYq7BylqyKNISyII3vrkNQNmj2W9oo4Osk xYjodvdHkrUNxWIzPbl1V7wIJ4HUT1cG7ti/M5yJWTrrqJON4NgO3RSgzo3Z7JKYVSnX DCEA5RYex0UASa6/h+aKWow+99IKR1BuzjvOwI0OqLtahAFarqOXaUBv70EQl4iTbuuB R2bE0wtJvnmHyJESBJ/6nTYQesNVhsC69TcNhWOprMdwhfsSO225wjTWGQIHS5anfp+G xpM+Li69G1YycWMEdSoj2C94grIPgv7ryPxQUQWfjvylwNCYEbK6iFj2LmJfBaWzIbO3 /dzw== X-Gm-Message-State: ALoCoQl1QxwEMOMEFyRnWsPGQif1AXdWw00WCryPtE+0O12KS8tV2XGrqPefJmYtphjx4aWDKB7d X-Received: by 10.236.93.194 with SMTP id l42mr1016112yhf.17.1399517862143; Wed, 07 May 2014 19:57:42 -0700 (PDT) Received: from tornado.leadboat.com (c-107-4-219-91.hsd1.va.comcast.net. [107.4.219.91]) by mx.google.com with ESMTPSA id u5sm30026696yhg.25.2014.05.07.19.57.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 07 May 2014 19:57:41 -0700 (PDT) Date: Wed, 7 May 2014 22:57:39 -0400 From: Noah Misch To: Jeff Davis Cc: Tom Lane , pgsql-bugs@postgresql.org Subject: Re: regression failure on master with --disable-integer-datetimes Message-ID: <20140508025739.GC1355372@tornado.leadboat.com> References: <1399399313.27807.28.camel@sussancws0025> <2501.1399402111@sss.pgh.pa.us> <1399403882.27807.40.camel@sussancws0025> <20140506193952.GA1313980@tornado.leadboat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+pHx0qQiF2pBVqBT" Content-Disposition: inline In-Reply-To: <20140506193952.GA1313980@tornado.leadboat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.6 (--) 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 --+pHx0qQiF2pBVqBT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 06, 2014 at 03:39:52PM -0400, Noah Misch wrote: > It seems I also broke the ecpg test suite under --disable-integer-datetimes. > I think (not tested) the fix is s/123456789/123456123/ in dt_test2.pgc, > because it rounds under float datetimes and truncates under integer datetimes. Besides that, one of the new combinations had the same insufficient-precision problem that affected interval.sql. With your commit and the attached patch, "make check-world" looks good under --disable-integer-datetimes. -- Noah Misch EnterpriseDB http://www.enterprisedb.com --+pHx0qQiF2pBVqBT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ecpg-check-float-date-v1.patch" diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c index 0ba1936..4277c26 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c @@ -61,7 +61,7 @@ static char *times[] = { "0:04", "1:59 PDT", "13:24:40 -8:00", "13:24:40.495+3", - "13:24:40.123456789+3", + "13:24:40.123456123+3", NULL }; char *intervals[] = { "1 minute", @@ -145,7 +145,8 @@ main(void) sprintf(t, "%s %s", dates[i], times[j]); ts1 = PGTYPEStimestamp_from_asc(t, NULL); text = PGTYPEStimestamp_to_asc(ts1); - if (i != 19 || j != 3) /* timestamp as integer or double differ for this case */ + /* skip outputs sensitive to USE_INTEGER_DATETIMES */ + if (i != 19 || (j != 3 && j != 4)) printf("TS[%d,%d]: %s\n", i, j, errno ? "-" : text); free(text); diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout index 9a4587b..941bffb 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout @@ -103,7 +103,6 @@ Date[19]: 0099-01-08 BC (N - F) TS[19,0]: 0099-01-08 00:04:00 BC TS[19,1]: 0099-01-08 01:59:00 BC TS[19,2]: 0099-01-08 13:24:40 BC -TS[19,4]: 0099-01-08 13:24:40.123456 BC Date[20]: - (N - T) Date[21]: - (N - T) interval[0]: @ 1 min diff --git a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc index a127dd9..0bd1fec 100644 --- a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc +++ b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc @@ -43,7 +43,7 @@ static char *times[] = { "0:04", "1:59 PDT", "13:24:40 -8:00", "13:24:40.495+3", - "13:24:40.123456789+3", + "13:24:40.123456123+3", NULL }; char *intervals[] = { "1 minute", @@ -110,7 +110,8 @@ main(void) sprintf(t, "%s %s", dates[i], times[j]); ts1 = PGTYPEStimestamp_from_asc(t, NULL); text = PGTYPEStimestamp_to_asc(ts1); - if (i != 19 || j != 3) /* timestamp as integer or double differ for this case */ + /* skip outputs sensitive to USE_INTEGER_DATETIMES */ + if (i != 19 || (j != 3 && j != 4)) printf("TS[%d,%d]: %s\n", i, j, errno ? "-" : text); free(text); --+pHx0qQiF2pBVqBT Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --+pHx0qQiF2pBVqBT--