postgres.git / summary / log / commit / refs

commit    bbc048319f01819523b2d9f6b1e81f0951280517
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Sun May 29 17:10:23 2005 +0000
First released in: 8.1.0, 7.3.11, 7.4.9, 8.0.4

    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.


src/backend/parser/parse_relation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index d1e5fca2aae..bb32ebdf1c1 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.107 2005/04/28 21:47:14 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.108 2005/05/29 17:10:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1333,7 +1333,7 @@ expandRTE(List *rtable, int rtindex, int sublevels_up, varnode = makeVar(rtindex, attnum, atttypid, - -1, + colDef->typename->typmod, sublevels_up); *colvars = lappend(*colvars, varnode); @@ -1678,7 +1678,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum, ColumnDef *colDef = list_nth(rte->coldeflist, attnum - 1); *vartype = typenameTypeId(colDef->typename); - *vartypmod = -1; + *vartypmod = colDef->typename->typmod; } else { [parent: e92a88272eb2]