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/catalog/catversion.h | 4 ++-- src/include/nodes/parsenodes.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/include') diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index dbf0395905..b97c3d07ec 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.347 2006/08/06 03:53:44 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.348 2006/08/10 02:36:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200608051 +#define CATALOG_VERSION_NO 200608091 #endif diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index d0fa16ff51..e2567ff8e4 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.1