Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2qpM-006itJ-Ky for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 11:11:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s2qpK-008Mvp-3e for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2024 11:11:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2qpJ-008Mvf-PN for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 11:11:42 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s2qpI-001Kao-9T for pgsql-general@lists.postgresql.org; Fri, 03 May 2024 11:11:42 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2dd041acff1so106692731fa.1 for ; Fri, 03 May 2024 04:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714734699; x=1715339499; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nM3g2Gs+zGuSjXGXn9vcxc6gM9OH45y5q9/kKSxPtOM=; b=ehfqAk1btnaKpDn4vycaM5p0C8TFOskg/gpVluntrwVdbwrbTAcVjK8o8D56uFEkj7 lE2GoY1iuRNkgCuKQFl7X5nz11qA8FYGCCaaaRKNoPKINt78arWBbbGhcoEnWZ1Pfz0f lJJCdTsoUHl7v8KckuxTMO7qvma97HVgKXJ/F/ulQWl38sTWqt1XMFBS1xg7ugvrkxHg BZbtpsvXG0P0sEIod1FpZMetD7HIE8kytt9+q7wNHxghHuaoTqdkqdKStYVT17WigVQh PGjvnqoDb82G6OBaEsbaFgKCFPgpiNwSFQHzTBk7Zju3avGPz04QAi2ku+eMwI5BKjYa O5gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714734699; x=1715339499; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nM3g2Gs+zGuSjXGXn9vcxc6gM9OH45y5q9/kKSxPtOM=; b=pTPcQ3CGvJ9iqN3crSq1BBF7L97YroE9Kq3P8rDVxjvD71EYicRZcYvpq4auO3x07/ kNflexTKguWf9gilIMav3Xo+nUVUECB7xCd9BWy+MtilrcRNQbm9GT9iYHsEgatZgT4q yCr2rwdLNpLOGkTqDbpCz09SXL1oaY6ItNg8tgtL+i7Vfmvwpabb0mrJQIb4O+nQRXbp +gqbl/f92uKZdmYAhrDOh+/YFKpiCgMvx/h4vy18Xoe36XzzHd+xF6DsnwMLTxvb82QG gCxky3i5wTbGZWt6XTvymj5s9OLCsNdEHQdGbNdEF9UfQ1JhhnfT8rjIfFwNy2iTZ81P pmkA== X-Gm-Message-State: AOJu0Yxgl51oStQYFO1jq0lPHcpqfu9JNpSTs73KwztvDWBiTUjJC9zC slaR7epi/DC4AD36NO0Y0W/eoPC835tgkO25ZfMcW4N8zm+Ff6WVEAhcoRZIyz2Udms0M5nmusq DtTEm6/USYh9XSM2lmMdqK6GotCYLgA== X-Google-Smtp-Source: AGHT+IHy4jW2din7omkeihZOXZOopMFtRSLU5wrv4XNfppK9FYnekV0XgZ5MRm9KM1tjqopCDfwJvj/Su5gykOh8FnM= X-Received: by 2002:a2e:9acb:0:b0:2e0:774b:706c with SMTP id p11-20020a2e9acb000000b002e0774b706cmr1557067ljj.3.1714734698841; Fri, 03 May 2024 04:11:38 -0700 (PDT) MIME-Version: 1.0 References: <17582807-412b-406e-9504-f0e1089888a1@eisentraut.org> In-Reply-To: <17582807-412b-406e-9504-f0e1089888a1@eisentraut.org> From: Muhammad Ikram Date: Fri, 3 May 2024 16:11:27 +0500 Message-ID: Subject: Re: Identity column data type difference in PostgreSQL and Oracle To: Peter Eisentraut Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="0000000000009bcf7106178ac8a5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009bcf7106178ac8a5 Content-Type: text/plain; charset="UTF-8" Thanks for the advice. On Fri, 3 May 2024 at 16:09, Peter Eisentraut wrote: > On 03.05.24 12:57, Muhammad Ikram wrote: > > Tables which have an identity column in Oracle when migrated to > > PostgreSQL, the data type of Identity column is changed to bigint from > > number by the tools. This causes the size of column to be reduced to max > > value supported by bigint which is way lower than the oracle number max. > > Sequences in PostgreSQL are limited to bigint, there is nothing that can > be changed about that. But you are approximately the first person to > complain that the range of ids provided by bigint is too small, so maybe > it's worth reconsidering whether it would work for you. If it really is > too small, maybe a uuid would work. But yes, you'll need to make some > adjustments to the rest of your database or application code if you make > such changes. > > --0000000000009bcf7106178ac8a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the advice.


On Fri, 3 May 2024 at 16:09,= Peter Eisentraut <peter@eisentr= aut.org> wrote:
On 03.05.24 = 12:57, Muhammad Ikram wrote:
> Tables which have an identity column in Oracle when migrated to
> PostgreSQL, the data type of Identity column is changed to bigint from=
> number by the tools. This causes the size of column=C2=A0to be reduced= to max
> value supported by bigint which is way lower than the oracle=C2=A0 num= ber max.

Sequences in PostgreSQL are limited to bigint, there is nothing that can be changed about that.=C2=A0 But you are approximately the first person to =
complain that the range of ids provided by bigint is too small, so maybe it's worth reconsidering whether it would work for you.=C2=A0 If it rea= lly is
too small, maybe a uuid would work.=C2=A0 But yes, you'll need to make = some
adjustments to the rest of your database or application code if you make such changes.

--0000000000009bcf7106178ac8a5--