Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbbc0483

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 columndefinition list. Apparently no one has tried to use non-default typmodwith a function returning RECORD before.
1 parente92a882 commitbbc0483

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)

[8]ページ先頭

©2009-2025 Movatter.jp