mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Make SubPlan nodes carry the result's typmod as well as datatype OID. This is
for consistency with the (relatively) recent addition of typmod to SubLink. An example of why it's a good idea is to be seen in the recent "failed to locate grouping columns" bug, which wouldn't have happened if a SubPlan exposed the same typmod info as the SubLink it was derived from. This could be back-patched, since it doesn't affect any on-disk data format, but for the moment it doesn't seem necessary to do so.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.146 2009/02/25 03:30:37 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.147 2009/03/10 22:09:26 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -504,6 +504,7 @@ typedef struct SubPlan
|
||||
int plan_id; /* Index (from 1) in PlannedStmt.subplans */
|
||||
/* Extra data useful for determining subplan's output type: */
|
||||
Oid firstColType; /* Type of first column of subplan result */
|
||||
int32 firstColTypmod; /* Typmod of first column of subplan result */
|
||||
/* Information about execution strategy: */
|
||||
bool useHashTable; /* TRUE to store subselect output in a hash
|
||||
* table (implies we are doing "IN") */
|
||||
|
||||
Reference in New Issue
Block a user