Re: Compare with default value?

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Ulrich Goebel <ml(at)fam-goebel(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Compare with default value?
Date: 2021-03-13 20:58:54
Message-ID: 387FDBCC-4065-4A9E-B602-E71B510D9D20@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Mar 13, 2021, at 1:51 PM, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> 
>> On Sat, Mar 13, 2021 at 1:41 PM Ulrich Goebel <ml(at)fam-goebel(dot)de> wrote:
>> But it could help to get a reference to the default value.
>
> There is no such thing as a "default value". There is a "default expression" though. It should be available in the system catalogs as part of the definition of a table. But I'm of the general impression that attributing some special significance to a value in the database because it happens to have been computed by a default expression instead of some explicitly supplied value is generally a wrong approach to take. The data should be interpreted in an internally self-sufficient way.
>
> David J.

Can you distinguish the case of the actual value matching the (computed) default?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Cross 2021-03-13 21:21:37 Re: Compare with default value?
Previous Message Joe Conway 2021-03-13 20:52:51 Re: Compare with default value?