Search Postgresql Archives

Re: How to set up a schema default date to '2020-01-01'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 9, 2020 at 10:21 PM mark armon <1994hejian@xxxxxxxxx> 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.
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux