public inbox for [email protected]
help / color / mirror / Atom feedFrom: PG Doc comments form <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: GENERATED ALWAYS AS - Not Consistent with MD5
Date: Mon, 21 Mar 2022 22:42:40 +0000
Message-ID: <[email protected]> (raw)
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.
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: GENERATED ALWAYS AS - Not Consistent with MD5
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