public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Holger Jakobs <[email protected]>
To: [email protected]
Subject: Re: Technical validation on altering atttypmod for numeric column in PostgreSQL
Date: Mon, 23 Mar 2026 14:57:37 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <BN7PR10MB2609BBFDA87D4BBC22ABF14D824BA@BN7PR10MB2609.namprd10.prod.outlook.com>
<[email protected]>
On Mon, 2026-03-23 at 14:47 +0100, Holger Jakobs wrote:
> > UPDATE pg_attribute SET atttypmod = (18 << 16 | 4) + 4 WHERE attrelid = 'table'::regclass AND attname = 'column';
> >
> > Is this approach considered safe from a data integrity
> > perspective?
>
> this change can lead to problems, because numbers with more than 16 digits before the decimal
> point wouldn't fit into the new data type.
Aww, right.
Goes to show how dangerous such operations are.
Yours,
Laurenz Albe
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Technical validation on altering atttypmod for numeric column in PostgreSQL
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox