From 0ee26100b64702f2fb4cd65c6dfdfb8f31e88130 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 10 Aug 2006 02:36:29 +0000 Subject: Fix UNION/INTERSECT/EXCEPT so that when two inputs being merged have same data type and same typmod, we show that typmod as the output typmod, rather than generic -1. This responds to several complaints over the past few years about UNIONs unexpectedly dropping length or precision info. --- src/include/nodes/parsenodes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/include/nodes/parsenodes.h') diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index d0fa16ff51c..e2567ff8e44 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.320 2006/08/02 01:59:47 joe Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.321 2006/08/10 02:36:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -769,7 +769,8 @@ typedef struct SetOperationStmt /* Eventually add fields for CORRESPONDING spec here */ /* Fields derived during parse analysis: */ - List *colTypes; /* list of OIDs of output column types */ + List *colTypes; /* OID list of output column type OIDs */ + List *colTypmods; /* integer list of output column typmods */ } SetOperationStmt; -- cgit v1.2.3