Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJJE0-0005ik-AT for pgsql-general@arkaria.postgresql.org; Sat, 12 Oct 2019 15:22:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iJJD1-0003mP-5F for pgsql-general@arkaria.postgresql.org; Sat, 12 Oct 2019 15:21:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJJD0-0003lW-NE for pgsql-general@lists.postgresql.org; Sat, 12 Oct 2019 15:21:30 +0000 Received: from mx-us-phx-04.bmc.com ([198.147.194.159] helo=mx-us-phx-04-int.bmc.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iJJCy-0000cG-HO for pgsql-general@postgresql.org; Sat, 12 Oct 2019 15:21:29 +0000 Received: from pps.filterd (mx-us-phx-04-int.bmc.com [127.0.0.1]) by mx-us-phx-04-int.bmc.com (8.16.0.27/8.16.0.27) with SMTP id x9CF9ON9005676 for ; Sat, 12 Oct 2019 15:21:27 GMT Received: from phx-exmbprd-02.adprod.bmc.com ([172.24.33.167]) by mx-us-phx-04-int.bmc.com with ESMTP id 2vk7539ax9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 12 Oct 2019 15:21:27 +0000 Received: from PHX-EXMBPRD-01.adprod.bmc.com (172.24.35.196) by phx-exmbprd-02.adprod.bmc.com (172.24.33.167) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 12 Oct 2019 10:21:26 -0500 Received: from PHX-EXMBPRD-01.adprod.bmc.com ([172.24.31.226]) by phx-exmbprd-01.adprod.bmc.com ([172.24.31.226]) with mapi id 15.00.1497.000; Sat, 12 Oct 2019 10:21:26 -0500 From: "Abraham, Danny" To: "pgsql-general@postgresql.org" CC: "Abraham, Danny" Subject: day interval Thread-Topic: day interval Thread-Index: AdWBEF/ib8cQwVJNQVyYwInayK8HtQ== Date: Sat, 12 Oct 2019 15:21:26 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [192.168.6.253] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-12_07:,, signatures=0 X-Proofpoint-Spam-Reason: safe List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi A question on day interval select date('20191001') - date('20190923'); Will provide sometimes '8' - an integer , but sometimes '8 day' - a string How can I control it to return integer always? Thanks Danny =20