mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Create a new expression node type RelabelType, which exists solely to
represent the result of a binary-compatible type coercion. At runtime it just evaluates its argument --- but during type resolution, exprType will pick up the output type of the RelabelType node instead of the type of the argument. This solves some longstanding problems with dropped type coercions, an example being 'select now()::abstime::int4' which used to produce date-formatted output, not an integer, because the coercion to int4 was dropped on the floor.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: nodes.h,v 1.65 2000/02/18 09:29:43 inoue Exp $
|
||||
* $Id: nodes.h,v 1.66 2000/02/20 21:32:16 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -67,6 +67,7 @@ typedef enum NodeTag
|
||||
T_Array,
|
||||
T_ArrayRef,
|
||||
T_Iter,
|
||||
T_RelabelType,
|
||||
|
||||
/*---------------------
|
||||
* TAGS FOR PLANNER NODES (relation.h)
|
||||
|
Reference in New Issue
Block a user