GENERATED ALWAYS AS - Not Consistent with MD5

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема GENERATED ALWAYS AS - Not Consistent with MD5
Дата
Msg-id 164790256029.701350.8616885741554177403@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: GENERATED ALWAYS AS - Not Consistent with MD5
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/ddl-generated-columns.html
Description:

In my table definition - my Id Column is defined as ```Id TEXT PRIMARY KEY
GENERATED ALWAYS AS (MD5(date_part('epoch', Inv_Date)::TEXT || TerminalId ||
GradeId || Ownership_Code)) STORED,```

But the value generated is not consistent upon insertion.
To confirm we checked by generating MD5 on SELECT and comparing the Id,
they're two completely different values.

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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: SQL "RETURNING * | output_expression [ [ AS ]" is wrong
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: maximum number of backtrace frames logged by backtrace_functions