Re: How to set up a schema default date to '2020-01-01'? - Mailing list pgsql-general

From David G. Johnston
Subject Re: How to set up a schema default date to '2020-01-01'?
Date
Msg-id CAKFQuwaoG9KuZTHCtWFyyYT_+TurOc3_WHW+_3K1rgjJkJMKcg@mail.gmail.com
Whole thread Raw
In response to Re: How to set up a schema default date to '2020-01-01'?  (mark armon <1994hejian@gmail.com>)
List pgsql-general
On Mon, Nov 9, 2020 at 10:21 PM mark armon <1994hejian@gmail.com> wrote:

like I create a schema: test, I want the default date to 2020-01-01, so when I do

select test.now;

the result is 2020-01-01

That is not presently a feature that PostgreSQL implements.

While you can leverage probably a custom configuration variable it might be less subtle to simply store the desired reference in a SQL function and then call the function.

David J.
 

pgsql-general by date:

Previous
From: mark armon
Date:
Subject: Re: How to set up a schema default date to '2020-01-01'?
Next
From: raf
Date:
Subject: Re: How to set up a schema default date to '2020-01-01'?