Re: now() literal in pg_input_is_valid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: now() literal in pg_input_is_valid
Date: 2023-07-09 14:22:02
Message-ID: 1867891.1688912522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

jian he <jian(dot)universality(at)gmail(dot)com> writes:
> should I expect
> select pg_input_is_valid($$[now(), infinity)$$,'tstzrange');
> returns true?

No. "now()" is not a literal, it's a function call.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Avi Weinberg 2023-07-09 14:22:37 Problematic enforcement of "ERROR: functions in index predicate must be marked IMMUTABLE"
Previous Message Rita 2023-07-09 13:27:57 Re: pgbouncer best practices