public inbox for [email protected]  
help / color / mirror / Atom feed
From: Euler Taveira <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: GENERATED ALWAYS AS - Not Consistent with MD5
Date: Thu, 24 Mar 2022 22:48:31 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Mon, Mar 21, 2022, at 7:42 PM, PG Doc comments form wrote:
> 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.
> 
It works for me. Could you provide a self-contained test case? What's your
current version?

This list is for documentation discussion. For general questions, use
pgsql-general. For bug reports, use pgsql-bugs.


--
Euler Taveira
EDB   https://www.enterprisedb.com/


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