From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, George Neuner <gneuner2(at)comcast(dot)net>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Freezing localtimestamp and other time function on some value |
Date: | 2016-04-13 17:22:36 |
Message-ID: | CAKFQuwZv0FzN68PR9nZ_xyoV-sdhYXzqnTkgv7jUd5KWrwbdyA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Apr 13, 2016 at 10:14 AM, Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>
wrote:
> Some quick and dirty issue resolution is simple:
> set search_path = my_time_schema on db layer. After that you dont need to
> change any code. And can take for example freeze.fixed_date from config =)
> where my_time_schema contains all time function than I want to freeze.
> Nevertheless i dont know how to deal with say localtimestamp with this
> approach %). Where localtimestamp is defined? pg_catalog doesnt have it
>
> Some thoughts about localtimestamp redifinition with search_path?
>
"localtimestamp" isn't really a function but a keyword
that somewhat behaves as one.
http://www.postgresql.org/docs/current/static/functions-datetime.html
Specifically those defined in 9.9.4
The fact that they can be used without adding the parenthesis is a big
give-away. All true functions must use them. Note that these time
function do allow parentheses but they have a different meaning - to
specify precision as opposed to passing arguments - though the do look
similar.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Lenski | 2016-04-13 18:36:21 | sign function with INTERVAL? |
Previous Message | Alex Ignatov | 2016-04-13 17:14:23 | Re: Freezing localtimestamp and other time function on some value |