Skip to content

Commit bbc0483

Browse files
committed
expandRTE and get_rte_attribute_type mistakenly always imputed typmod -1
to columns of an RTE that was a function returning RECORD with a column definition list. Apparently no one has tried to use non-default typmod with a function returning RECORD before.
1 parent e92a882 commit bbc0483

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/parser/parse_relation.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.107 2005/04/28 21:47:14 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.108 2005/05/29 17:10:23 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1333,7 +1333,7 @@ expandRTE(List *rtable, int rtindex, int sublevels_up,
13331333
varnode = makeVar(rtindex,
13341334
attnum,
13351335
atttypid,
1336-
-1,
1336+
colDef->typename->typmod,
13371337
sublevels_up);
13381338

13391339
*colvars = lappend(*colvars, varnode);
@@ -1678,7 +1678,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum,
16781678
ColumnDef *colDef = list_nth(rte->coldeflist, attnum - 1);
16791679

16801680
*vartype = typenameTypeId(colDef->typename);
1681-
*vartypmod = -1;
1681+
*vartypmod = colDef->typename->typmod;
16821682
}
16831683
else
16841684
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy