2000-01-17:像 x::int2::float8 这样的 cast 构造现在如预期般工作

25 年前的今天(PostgreSQL 7.0 开发周期),新增了一个新的解析树节点类型 TypeCast

commit 49528361f521b432da2cfafcb81cade17eb324d1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Mon Jan 17 00:14:49 2000 +0000

    Create a new parsetree node type, TypeCast, so that transformation of
    SQL cast constructs can be performed during expression transformation
    instead of during parsing.  This allows constructs like x::numeric(9,2)
    and x::int2::float8 to behave as one would expect.

不幸的是,从提交记录来看,不清楚这些构造之前是如何不如预期的,但相应的发布说明项说:

Allow complex type casts like col::numeric(9,2) and col::int2::float8

因此,可以推断它们以前根本不起作用。