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

From James Coleman
Subject Should we document how column DEFAULT expressions work?
Date
Msg-id CAAaqYe-wQPbchCUE7pocPNEQ3PMY8a98Txmxc7q0+FvXtk1vvg@mail.gmail.com
Whole thread Raw
Responses Re: Should we document how column DEFAULT expressions work?
Re: Should we document how column DEFAULT expressions work?
List pgsql-hackers
Hello,

It's possible I'm the only one who's been in this situation, but I've
multiple times found myself explaining to a user how column DEFAULT
expressions work: namely how the quoting on an expression following
the keyword DEFAULT controls whether or not the expression is
evaluated at the time of the DDL statement or at the time of an
insertion.

In my experience this is non-obvious to users, and the quoting makes a
big difference.

Is this something that we should document explicitly? I don't see it
called out in the CREATE TABLE reference page, but it's possible I'm
missing something.

Thanks,
James Coleman



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Backporting BackgroundPsql
Next
From: Tom Lane
Date:
Subject: Re: Backporting BackgroundPsql