From: Thomas Kellerer <shammat@gmx.net>
To: pgsql-admin@postgresql.org
Cc: soumik.bhattacharjee@kpn.com
Subject: Re: Data Type to store Leading Zero(0)
Date: Wed, 20 Jan 2021 13:39:50 +0100
Message-ID: <5e0bb278-b0a1-27b6-5739-c357a86334db@gmx.net> (raw)
In-Reply-To: <c77968e8e35a4e9d8f68c2683ae1b807@kpn.com>
References: <c77968e8e35a4e9d8f68c2683ae1b807@kpn.com>
soumik.bhattacharjee@kpn.com schrieb am 20.01.2021 um 12:13:
> As per business needs we need to store Zero(0) in primary key column
> of table with this kind of value à 07******** with applications
> written in Java microservices.
>
> We are not able to use *numeric data type *as it trims the Zero value
> in leading,**but it’s also aperformance impact if we define *varchar*
> in the data type.
While there is a performance impact between an integer and varchar, in my experience
it's rarely that big that it will become a problem.
Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: shammat@gmx.net, soumik.bhattacharjee@kpn.com
Subject: Re: Data Type to store Leading Zero(0)
In-Reply-To: <5e0bb278-b0a1-27b6-5739-c357a86334db@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox