Re: Technical validation on altering atttypmod for numeric column in PostgreSQL

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Technical validation on altering atttypmod for numeric column in PostgreSQL
Дата
Msg-id 4b3b47cbf91c31767d99222a9a849827f7e01620.camel@cybertec.at
обсуждение
Ответ на Re: Technical validation on altering atttypmod for numeric column in PostgreSQL  (Holger Jakobs <holger@jakobs.com>)
Список pgsql-admin
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



В списке pgsql-admin по дате отправления: