Re: Should we document how column DEFAULT expressions work? - Mailing list pgsql-hackers

From David Rowley
Subject Re: Should we document how column DEFAULT expressions work?
Date
Msg-id CAApHDvqShXhOat03iEV1VqXM68DBJ+zM95Ghbu0rcqs8KnhQQQ@mail.gmail.com
Whole thread Raw
In response to Re: Should we document how column DEFAULT expressions work?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Should we document how column DEFAULT expressions work?
List pgsql-hackers
On Wed, 26 Jun 2024 at 17:36, David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Tue, Jun 25, 2024 at 9:50 PM David Rowley <dgrowleyml@gmail.com> wrote:
>> FWIW, I disagree that we need to write anything about that in this
>> part of the documentation.  I think any argument for doing this could
>> equally be applied to something like re-iterating what the operator
>> precedence rules for arithmetic are, and I don't think that should be
>> mentioned.
>
>
> I disagree on this equivalence.  The time literals are clear deviations from expected behavior.  Knowing operator
precedencerules, they apply everywhere equally.  And we should document the deviations directly where they happen.
Evenif it's just a short link back to the source that describes the deviation.  I'm fine with something less verbose
pointingonly to the data types page, but not with nothing. 

Are you able to share what the special behaviour is with DEFAULT
constraints and time literals that does not apply everywhere equally?

Maybe I'm slow on the uptake, but I've yet to see anything here where
time literals act in a special way DEFAULT constraints. This is why I
couldn't understand why we should be adding documentation about this
under CREATE TABLE.

I'd be happy to reconsider or retract my argument if you can show me
what I'm missing.

David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Should we document how column DEFAULT expressions work?
Next
From: Tom Lane
Date:
Subject: Re: Should we document how column DEFAULT expressions work?