看起来 postgres 将字符串'now()'
视为对函数的调用now()
。
为什么 postgres 允许这样做?
select 'now'::timestamp;
或这个?
select 'now()'::timestamp;
甚至这个?
select ' ( ( ))) now)('::timestamp;
它不会对其他函数(例如clock_timestamp()
.
看起来 postgres 将字符串'now()'
视为对函数的调用now()
。
为什么 postgres 允许这样做?
select 'now'::timestamp;
或这个?
select 'now()'::timestamp;
甚至这个?
select ' ( ( ))) now)('::timestamp;
它不会对其他函数(例如clock_timestamp()
.