Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2BQj-0000V4-A5 for pgsql-admin@arkaria.postgresql.org; Wed, 20 Jan 2021 11:13:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2BQh-00020T-0x for pgsql-admin@arkaria.postgresql.org; Wed, 20 Jan 2021 11:13:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2BQg-00020M-NJ for pgsql-admin@lists.postgresql.org; Wed, 20 Jan 2021 11:13:38 +0000 Received: from cpdelvb-safe101.kpnxchange.com ([195.121.3.35]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2BQd-0008Pt-Po for pgsql-admin@postgresql.org; Wed, 20 Jan 2021 11:13:38 +0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_c77968e8e35a4e9d8f68c2683ae1b807kpncom_" DKIM-Signature: v=1; a=rsa-sha256; d=kpn.com; s=safemail01; c=relaxed/relaxed; t=1611141214; h=mime-version:date:message-id:subject:from:to:content-type; bh=cXpvC0huwJ8FGDtKGO1YAYVdE/5UmnJQXTQN8QMTSv4=; b=s0SUTj/jf/yp6BpnYNJR2mwnON2cv+NPVg1Jn0IZwOuzuPM7tVtQ5gusZBv7pa30eckdHKHnzgy oZVRIME2JETeZiSgNGaBI0KB4lcSbzBZP5+a3XeRzG3kyrVucRvmco0LcCTCX5bgSVMIxpJychXHk P4EAYOAP0+kFQERvEVo= Received: from CPSUBM-SAFE102.kpnxchange.com ([10.94.186.7]) by cpdelvb-safe101.kpnxchange.com with Microsoft SMTPSVC(8.5.9600.16384); Wed, 20 Jan 2021 12:13:34 +0100 X-KPNSenderID: 4294967167 Received: from CPEMS-KPN106.KPNCNL.LOCAL ([195.121.122.236]) by CPSUBM-SAFE102.kpnxchange.com over TLS secured channel with Microsoft SMTPSVC(8.5.9600.16384); Wed, 20 Jan 2021 12:13:34 +0100 Received: from CPEMS-KPN04.KPNCNL.LOCAL (192.168.99.143) by CPEMS-KPN106.KPNCNL.LOCAL (192.168.100.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Wed, 20 Jan 2021 12:13:34 +0100 Received: from CPEMS-KPN04.KPNCNL.LOCAL ([fe80::fdd3:71c2:6cc7:f0ec]) by CPEMS-KPN04.KPNCNL.LOCAL ([fe80::fdd3:71c2:6cc7:f0ec%7]) with mapi id 15.01.2044.012; Wed, 20 Jan 2021 12:13:34 +0100 From: To: Subject: Data Type to store Leading Zero(0) Thread-Topic: Data Type to store Leading Zero(0) Thread-Index: AdbvHUnbjSd+V1D0S8mv07OjqCiMeQ== Date: Wed, 20 Jan 2021 11:13:34 +0000 Message-ID: Accept-Language: nl-NL, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_Enabled=true; MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_SetDate=2021-01-20T11:13:32Z; MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_Method=Standard; MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_Name=d2dc6f62-bb58-4b94-b6ca-9af54699d31b; MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_SiteId=d7790549-8c35-40ea-ad75-954ac3e86be8; MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_ActionId=d3379ebc-49c7-4b82-8394-4153e60265d5; MSIP_Label_d2dc6f62-bb58-4b94-b6ca-9af54699d31b_ContentBits=0 x-originating-ip: [192.168.100.129] MIME-Version: 1.0 X-OriginalArrivalTime: 20 Jan 2021 11:13:34.0733 (UTC) FILETIME=[4B1D9BD0:01D6EF1D] X-RcptDomain: postgresql.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_c77968e8e35a4e9d8f68c2683ae1b807kpncom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Experts, As per business needs we need to store Zero(0) in primary key column of tab= le with this kind of value --> 07******** with applications written in Ja= va microservices. We are not able to use numeric data type as it trims the Zero value in lead= ing, but it's also a performance impact if we define varchar in the data ty= pe. Please suggest. Thanks --_000_c77968e8e35a4e9d8f68c2683ae1b807kpncom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello Experts,

 

As per business needs we need t= o store Zero(0) in primary key column of table  with this kind of valu= e à=   07******** with applications written in Java mi= croservices.

 

We are not able to use <= b>numeric data type as it trims the Zero value in leading, <= /b>but it’s also a performance impact if = we define varchar in the data type.

 

Please suggest.

 

Thanks

 

--_000_c77968e8e35a4e9d8f68c2683ae1b807kpncom_--